Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize create socket #5293

Merged
merged 3 commits into from
Apr 16, 2024
Merged

optimize create socket #5293

merged 3 commits into from
Apr 16, 2024

Conversation

NathanFreeman
Copy link
Member

No description provided.

@@ -325,6 +325,8 @@ struct ListenPort {
void close();
bool import(int sock);
const char *get_protocols();
int create_socket(swoole::Server *server);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已在命名空间中,去掉 swoole::

@@ -325,6 +325,8 @@ struct ListenPort {
void close();
bool import(int sock);
const char *get_protocols();
int create_socket(swoole::Server *server);
void close_socket_fd();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议修改为 close_socketcreate_socket 命名对称

}
}

socket = swoole::make_socket(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可去掉命名空间

@matyhtf matyhtf merged commit 1594cf5 into swoole:v6.0 Apr 16, 2024
20 of 35 checks passed
matyhtf added a commit that referenced this pull request May 9, 2024
* Optimize code

* thread local

* swoole thread

* optimize argv

* optimize code, add more methods for thread

* Swoole\Thread\Map

* Swoole\Thread\ArrayList

* Optimize

* zend_array

* Optimize

* Optimize

* Optimize

* fix

* remove co redis/mysql/pgsql client

* Added Thread\Queue

* Fix Thread\Queue

* fix mem leak

* optimize, reduce memory copy

* Revert "optimize, reduce memory copy"

This reverts commit 449adf9.

* optimize code, remove 8.0 supports

* refactor atomic/lock, support thread

* clang-format

* fix tests

* [6.0] Server for thread mode (#5282)

* http server for thread mode

* fix compile error

* optimize code

* optimize code

* optimize code[2]

* optimize code[3]

* optimize code[4]

* refactor co-socket, support thread

* add signal example

---------

Co-authored-by: NathanFreeman <[email protected]>

* Update version

* Optimize header

* Fix

* refactor async-threads, support ZTS

* Optimize

* Optimize

* Optimize

* Optimize

* Optimize 5

* Optimize 6

* Optimize 7

* Optimize 8

* Optimize 10

* Optimize 11, add Server::get_worker_id()

* Optimize 12

* Optimize 13

* Optimize 14

* rename

* Refactor

* Refactor 2

* revert , format

* onPipeMessage/onTask/onFinish, fix message bus

* Update README.md

* Added pty support for proc_open function, fix #5275 (#5290)

* support pty, fix #5275

* fix

* fix 2

* fix

* fix BC

* fix tests

* Update boost asm (#5291)

* update boost asm

* Fix error

* fix tests

* fix tests

* fix tests

* remove hiredis

* fix tests [3]

* fix tests [4]

* fix tests [5], revert SwooleWG

* fix tests [6]

* fix tests [7]

* fix tests [8]

* optimize tests

* add thread test

* fix ci

* [test] fix ci 2

* [test] fix ci 3

* [test] fix ci 4

* [test] fix ci 5

* [test] fix ci 6

* [test] fix ci 7

* [test] fix ci 8

* [test] fix ci 9

* [test] fix ci 10

* [test] fix ci 11

* [test] remove swoole_timer_set, async settings can only be set in the main thread

* optimize create socket (#5293)

* optimize create socket

* fix error

* optimize code

* [test] fix tests

* [test] fix tests [3]

* [test] fix tests [4]

* sync plain_wrapper (#5296)

* [test] fix tests [5]

* No limit on the maximum buffer length of the read pipeline

* Refactor

* fix

* optimize tests

* fix tests

* code format

* fix tests

* fix tests

* fix tests [3]

* Fix transfer_t struct missing (#5303)

* Fix missing transfer_t

* Fix missing transfer_t

* Optimize thread context

* Fix tests[4]

* Refactor

* Refactor

* Refactor

* fix server shutdown

* fix thread atomic

* fix core tests

* Fix Sqlite pdo segmentfault (#5311)

* fix pdo

* fix sqlite error

* fix sqlite error

* fix sqlite error

* fix core tests

* Support passing streams between threads

* Support using stream as a thread argument

* optimize code

* optimize code

---------

Co-authored-by: NathanFreeman <[email protected]>
Co-authored-by: MARiA so cute <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants