该版本会为 onConnect、onReceive、onPacket 等回调函数,默认开启协程并发回调。
参见源码:
https://github.com/swoole/swoole-src/blob/v4.0.0/swoole_server.c#L884
https://github.com/swoole/swoole-src/blob/v4.0.0/swoole_server.c#L990
| 0 = Success | |
| 1 = Operation not permitted | |
| 2 = No such file or directory | |
| 3 = No such process | |
| 4 = Interrupted system call | |
| 5 = Input/output error | |
| 6 = No such device or address | |
| 7 = Argument list too long | |
| 8 = Exec format error |
| ## Sublime Text 3 Serial key build is 3176 | |
| > * Added these lines into /etc/hosts | |
| 127.0.0.1 www.sublimetext.com | |
| 127.0.0.1 license.sublimehq.com | |
| > * Used the license key | |
| ----- BEGIN LICENSE ----- |
| diff --git a/src/network/ReactorThread.c b/src/network/ReactorThread.c | |
| index e3aac4f5..a9617ff3 100644 | |
| --- a/src/network/ReactorThread.c | |
| +++ b/src/network/ReactorThread.c | |
| @@ -197,14 +197,14 @@ static int swReactorThread_onPackage(swReactor *reactor, swEvent *event) | |
| { | |
| pkt.port = ntohs(info.addr.inet_v4.sin_port); | |
| pkt.addr.v4.s_addr = info.addr.inet_v4.sin_addr.s_addr; | |
| - task.data.info.fd = pkt.addr.v4.s_addr; | |
| + task.data.info.fd = pkt.port; |
| <?php | |
| // DEFINE our cipher | |
| define('AES_256_CBC', 'aes-256-cbc'); | |
| // Generate a 256-bit encryption key | |
| // This should be stored somewhere instead of recreating it each time | |
| $encryption_key = openssl_random_pseudo_bytes(32); | |
| // Generate an initialization vector | |
| // This *MUST* be available for decryption as well |
| curl --include \ | |
| --no-buffer \ | |
| --header "Connection: Upgrade" \ | |
| --header "Upgrade: websocket" \ | |
| --header "Host: example.com:80" \ | |
| --header "Origin: http://example.com:80" \ | |
| --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \ | |
| --header "Sec-WebSocket-Version: 13" \ | |
| http://example.com:80/ |
该版本会为 onConnect、onReceive、onPacket 等回调函数,默认开启协程并发回调。
参见源码:
https://github.com/swoole/swoole-src/blob/v4.0.0/swoole_server.c#L884
https://github.com/swoole/swoole-src/blob/v4.0.0/swoole_server.c#L990
| /***************************************************************************** | |
| * QuantCup 1: Price-Time Matching Engine | |
| * | |
| * Submitted by: voyager | |
| * | |
| * Design Overview: | |
| * In this implementation, the limit order book is represented using | |
| * a flat linear array (pricePoints), indexed by the numeric price value. | |
| * Each entry in this array corresponds to a specific price point and holds | |
| * an instance of struct pricePoint. This data structure maintains a list |
| #!/usr/bin/env bash | |
| #Copyright (C) 2018 Eagle <[email protected]> | |
| ES_HOST="http://127.0.0.1:9200" | |
| SEVEN_DAYS_AGO=$(date -d "-7 day" +%Y.%m.%d) | |
| THREE_DAYS_AGO=$(date -d "-3 day" +%Y.%m.%d) | |
| declare -a INDEX_FOR_SEVEN=( | |
| "filebeat-xxx-" |