Coroutine-based cross-platform concurrent I/O engine.
一波API重构:
Buffer
类取消内置偏移,这解决了许多问题HttpParser->execute()
: 现在它返回的是parsed长度而非事件了一些新功能:
Major API refactor:
Buffer
class, this solves many bugsHttpParser->execute()
: now it returns parsed length rather than eventsSomething New:
开发进展记录
detectShouldKeepAlive()
检查 (#132)Http\Parser->getPreviousEvent()
Http\Parser->getPreviousEventName()
`Http\Parser::getEventNameFor(int $event)WebSocket::mask()
和 WebSocket::unmask()
工具函数Socket->sendString()
, 现在可以用Socket->send()
WebSocket\Frame
, Websocket现在使用WebSocket\Header
类加自己的payloadHttpParser->execute()
: 现在它返回的是parsed长度而非事件了Errno::
getNameFor(int) => getNameOf(int)
getReasonPhraseFor(int) => getReasonPhraseOf(int)
getDescriptionFor(int) => getDescriptionOf(int)
detectShouldKeepAlive()
check (#132)Http\Parser->getPreviousEvent()
Http\Parser->getPreviousEventName()
Http\Parser::getEventNameFor(int $event)
WebSocket::mask()
and WebSocket::unmask()
utilitySocket->sendString()
, use Socket->send()
insteadWebSocket\Frame
, use WebSocket\Header
class with payload insteadHttpParser->execute()
: now it returns parsed length rather than eventsErrno::
getNameFor(int) => getNameOf(int)
getReasonPhraseFor(int) => getReasonPhraseOf(int)
getDescriptionFor(int) => getDescriptionOf(int)
*.pdb是调试符号,仅使用Swow不需要下载 *.pdb is debug symbols, not necessary for using Swow
File name | Size (in bytes) | SHA256 sum | Build log | Tests result |
---|---|---|---|---|
php_swow-php8.0-x64-nts-VS16.dll | 1167360 | 86194F331835652C1F93DEF9537C8FB28231FF43180F1171224D7D495DB582D0 | - | failure |
php_swow-php8.0-x64-ts-VS16.dll | 1192448 | A2DDEA6550CFDF8BB5A9031C8B36571B3C92995A641F943EF7B6D894B77394C6 | - | failure |
php_swow-php8.1-x64-nts-VS16.dll | 1166336 | CEA39A0A86F68EA44894386473472A22E961D1A2CFCDEFE7318F390EC02A1DC9 | - | failure |
php_swow-php8.1-x64-ts-VS16.dll | 1193472 | BC2608F4EE42960B2356ACC5B16A294D18841DC7D87EF83E47839473EA57DB1D | - | failure |
主要变化:
Closure
的序列化支持proc_open
Major changes:
Closure
serialization supportproc_open
hookTyped property Swow\Http\ServerRequest::$parsedBody must not be accessed before initialization
(#104)Coroutine::getCurrent
, Coroutine::getMain
Coroutine::getPrevious
Buffer->copy
函数签名Socket->sendTo
Socket->writeTo
Socket->sendStringTo
参数类型声明Coroutine->setLocalVar()
中的内存错误Coroutine::getExecutedFunctionName()
方法setUri(UriInterface $uri, ?bool $preserveHost = null): static
方法签名proc_open
的hookHttp\Parser->isMultipart(): bool
方法 Http\UploadFile
Http\RawUploadFile
类 array Http\RawResult->$uploadedFiles
属性等)Http\Parser->isChunked():bool
Http\Parser->getCurrentChunkLength(): int
方法等)Coroutine::registerDeadlockHandler(callable $callable): Util\Handler
API
Socket->getSimpleType(): int
Socket->getSimpleTypeName(): string
Socket::typeSimplify(int $type): int
Socket::typeName(int $type): string
Socket->getId(): int
APIHttp\Server\Connection->recvHttpRequestTo(Request $request): Request
Http\WebSocketTrait->recvWebSocketFrameTo(WebSocketFrame $frame): WebSocketFrame
APIHttp\MimeType
Stream\Psr7Stream
类Http\Message->detectContentLength(): int
APIObject\DupTrait
特质Http\Uri::from(UriInterface|string $uri): static
APICoroutine->isExecuting(): bool
APIHttp\Server\Connection->setServer()
,修改Http\Server\Connection
构造符为__construct(Server $server)
Http\Message->getBodyAsString()
Buffer->copy()
Errno
类中Swow
类中Yyyy\Xxxx\Exception
-> Yyyy\XxxxException
(#108)$capacity = -1
现在表示不限制channel的容量Socket->accept()
为Socket->accept(?int $timeout = null)
和Socket->acceptTo(Socket $connection, ?int $timeout = null)
Http\Server->acceptConnection
签名为Http\Server->acceptConnection(?int $timeout = null, ?Connection $connection = null)
Signal::wait()
函数签名为Socket::wait(int $num, int $timeout = -1)
($timeout
默认值为不超时)Socket->accept()
函数签名为Socket->accept(?Socket $connection = null, ?int $timeout = null)
(参数名修改)Util\copyDir
-> Util\touchDir
{Http\Status, Websocket\Opcode, WebSocket\Status}::{getName, getReasonPhrase, getDescription} -> {getNameFor, getReasonPhraseFor, getDescriptionFor}
Http\TypeInterface
-> Http\ProtocolTypeInterface
Http\RawResult->{$isUpgrade, $uploadedFiles} -> Http\RawRequest->{$isUpgrade, $uploadedFiles}
Coroutine->call()
签名为Coroutine->call(callable $callable, int $level = 0)
(添加$level
参数)Swow\WebSocket
中的命名空间常量为Swow\WebSocket
类常量\Http\BodyParser
类Socket::__construct(int $type)
(移除了默认值)WaitReference::wait(self &$ref, int $timeout = -1): void
(修改参数名称)Channel::OPCODE_*
为Channel\Selector::EVENT_*
Socket->enableCrypto(?array $options = null)
中设置tls选项Typed property Swow\Http\ServerRequest::$parsedBody must not be accessed before initialization
(#104)Coroutine::getCurrent
, Coroutine::getMain
Coroutine::getPrevious
Buffer->copy
functions signatureSocket->sendTo
Socket->writeTo
Socket->sendStringTo
arguments type hintCoroutine->setLocalVar()
memory corruptionCoroutine::getExecutedFunctionName()
method namesetUri(UriInterface $uri, ?bool $preserveHost = null): static
method signatureproc_open
hookHttp\Parser->isMultipart(): bool
method Http\UploadFile
Http\RawUploadFile
class array Http\RawResult->$uploadedFiles
e.t.c)Http\Parser->isChunked():bool
Http\Parser->getCurrentChunkLength(): int
e.t.c)Coroutine::registerDeadlockHandler(callable $callable): Util\Handler
API
Socket->getSimpleType(): int
Socket->getSimpleTypeName(): string
Socket::typeSimplify(int $type): int
Socket::typeName(int $type): string
Socket->getId(): int
APIHttp\Server\Connection->recvHttpRequestTo(Request $request): Request
Http\WebSocketTrait->recvWebSocketFrameTo(WebSocketFrame $frame): WebSocketFrame
APIHttp\MimeType
Stream\Psr7Stream
classesConnectionManagerTrait->getConnections(): array
APIHttp\Message->detectContentLength(): int
APIObject\DupTrait
traitHttp\Uri::from(UriInterface|string $uri): static
APICoroutine->isExecuting(): bool
APIHttp\Server\Connection->setServer()
, refactor Http\Server\Connection
constructor to __construct(Server $server)
Http\Message->getBodyAsString()
Buffer->copy()
Errno
final classSwow
final classYyyy\Xxxx\Exception
to Yyyy\XxxxException
(#108)$capacity = -1
indicates unlimited capacity for ChannelSocket->accept()
into Socket->accept(?int $timeout = null)
and Socket->acceptTo(Socket $connection, ?int $timeout = null)
Http\Server->acceptConnection
to Http\Server->acceptConnection(?int $timeout = null, ?Connection $connection = null)
Signal::wait()
to Socket::wait(int $num, int $timeout = -1)
($timeout
now have a -1 default value for no time limit)Socket->accept()
signature to Socket->accept(?Socket $connection = null, ?int $timeout = null)
(argument name changes)Util\copyDir
-> Util\touchDir
{Http\Status, Websocket\Opcode, WebSocket\Status}::{getName, getReasonPhrase, getDescription} -> {getNameFor, getReasonPhraseFor, getDescriptionFor}
Http\TypeInterface
-> Http\ProtocolTypeInterface
Http\RawResult->{$isUpgrade, $uploadedFiles} -> Http\RawRequest->{$isUpgrade, $uploadedFiles}
Coroutine->call()
signature to Coroutine->call(callable $callable, int $level = 0)
(add $level
param)Swow\WebSocket
to Swow\WebSocket
class constant\Http\BodyParser
classSocket::__construct(int $type)
(removed default value)WaitReference::wait(self &$ref, int $timeout = -1): void
(argument name changes)Channel::OPCODE_*
to Channel\Selector::EVENT_*
Socket->enableCrypto(?array $options = null)
*.pdb是调试符号,仅使用Swow不需要下载 *.pdb is debug symbols, not necessary for using Swow
File name | Size (in bytes) | SHA256 sum | Build log | Tests result |
---|---|---|---|---|
php_swow-php8.0-x64-nts-VS16.dll | 1126912 | D9A3D121365810EE4EC4B07FDAF2D29192E290417229280E02736B158729170C | link | success |
php_swow-php8.0-x64-ts-VS16.dll | 1153536 | AEFD772B5B0C17BCF95687B6B7730128821D725612EFCBB420495ED2F63F0A6B | link | success |
php_swow-php8.1-x64-nts-VS16.dll | 1134592 | F4EC39FCD862B4B7B7E5989EA07EC21C7D033AA4DEEFEABD2CD08977331082A5 | link | success |
php_swow-php8.1-x64-ts-VS16.dll | 1161728 | 9CECA2E59F1380EB69E9CB9D4155DD50267D3CAF13392C55BB92A23DAC8A82B6 | link | success |
Signal::kill($pid, $signum)
静态方法Debugger::showExecutedSourceLines()
静态方法Buffer->lock()
, Buffer->tryLock()
, Buffer->unlock()
方法允许Swow\Stream\EofStream
类Socket->isOpen():bool
, Socket->isServer():bool
, Socket->isServerConnection():bool
, Socket->isClient():bool
方法Signal::kill($pid, $signum)
static methodDebugger::showExecutedSourceLines()
static methodBuffer->lock()
, Buffer->tryLock()
, Buffer->unlock()
methods for user locking/unlocking bufferSwow\Stream\EofStream
classSocket->isOpen():bool
, Socket->isServer():bool
, Socket->isServerConnection():bool
, Socket->isClient():bool
methodsFile name | Size (in bytes) | SHA256 sum | Build log | Tests result |
---|---|---|---|---|
php_swow-php8.0-x64-nts-VS16.dll | 1103872 | 90502A9940C5CB98525017EA1797B9291479F1562676DE8A162A5ED4B142FA46 | link | failure(ci problem) |
php_swow-php8.0-x64-ts-VS16.dll | 1129472 | A3A08A700142E7EBF516DC7A00FDEC408AB31B5ED6AE16130FA221DFA5FD2C65 | link | failure(ci problem) |
php_swow-php8.1-x64-nts-VS16.dll | 1111040 | A790F78731FFB550C0FB766054E8091898689E080318A9B6B8E48E2A76EBBEBB | link | failure(ci problem) |
php_swow-php8.1-x64-ts-VS16.dll | 1137664 | 22FBC6D6442010A2F65078EA2B4504C130F56054A3002E65D1D04AD50B123047 | link | failure(ci problem) |
教师节快乐
Coroutine->getTrace($level, ...)
)调用栈层级参数的使用方式Coroutine::getCurrentRound()
为静态方法Socket->getConnectionError()
Socket->sendHandle()
Socket->recvHandle()
和Socket->acceptTyped()
Buffer->truncate($offset, $length)
方法为Buffer->truncateFrom($offset, $length)
,添加Buffer->truncate($length)
方法Server\Session
为Server\Connection
File name | Size (in bytes) | SHA256 sum | Build log | Tests result |
---|---|---|---|---|
php_swow-php7.3-x64-nts-VC15.dll | 1060864 | 3BFBBEB322BB59AB972C2304C124C28C78ECA3364ECF400F37AB5DE2EF1B5D96 | link | success |
php_swow-php7.3-x64-ts-VC15.dll | 1086976 | F8EC87A7B936BEF18ED52833D0069162430BAF681444323D0E54C63F2A684D20 | link | success |
php_swow-php7.4-x64-nts-VC15.dll | 1062912 | A8CD27F5D9FABA0FD1AAB6614E5F66FF78C7DF6502D93CDAEE2384EF057D4B5D | link | success |
php_swow-php7.4-x64-ts-VC15.dll | 1086976 | 7439D11648FEA032F257F2E979AE071245ACE2581578799D5405E2EFA03D6267 | link | success |
php_swow-php8.0-x64-nts-VS16.dll | 1092096 | FB35B17C2D5D37F8DA099D804A7038769DFD16D4D8BD5A6685565E974DF89E3B | link | success |
php_swow-php8.0-x64-ts-VS16.dll | 1116672 | 570CD1F2AD5E2540DB610CD107FE323106F129A8584BB2524DDDEA0DF687B19B | link | success |
六一儿童节快乐 Happy Children's Day
File name | Size (in bytes) | SHA256 sum | Build log | Tests result |
---|---|---|---|---|
php_swow-php8.0-x64-nts-VS16.dll | 1041920 | 5DB1121B2B0E42296FBEC8064F103B3311C1A70320A1DDB28AFF08E359D603F7 | link | skipped |
php_swow-php8.0-x64-ts-VS16.dll | 1065984 | 9F285633E92C90DFE12830648A06E4FA77D57A39EAC6E650E042D73FEA9B6476 | link | skipped |
php_swow-php7.4-x64-nts-VC15.dll | 1019392 | 738DDC8830D4F37C19E1C2613D3837FAE3A6D32B638D0937F04DE85C3AD6C651 | link | skipped |
php_swow-php7.4-x64-ts-VC15.dll | 1042944 | 7B192033098BA49E4B3B2A42BE252B6F18ABD1B659418B066F93E28CCAF53287 | link | skipped |
php_swow-php7.3-x64-nts-VC15.dll | 1018368 | 591D2E8EAC92B792D03E2B5BB72D404F4F564C4BCBA835627F0579029C1F2BD4 | link | skipped |
php_swow-php7.3-x64-ts-VC15.dll | 1042944 | 035603591989DE7B85783C1B0BAF7A33C69D68A3BBEEA6D13B4AA4D8B07AF80E | link | skipped |
周末快乐
File name | Size (in bytes) | SHA256 sum | Build log | Tests result |
---|---|---|---|---|
php_swow-php8.0-x64-nts-VS16.dll | 1046016 | D4E50477B96B9ADD5C71B9BADBE884ADC86E26EA804706066C2D7C2963098976 | link | buggy curl |
php_swow-php8.0-x64-ts-VS16.dll | 1069568 | EBC29C65917FEED1B8CF7B234DDE5E4A55E038395C75CFFD2BCC62E8138B2732 | link | buggy curl |
php_swow-php7.4-x64-nts-VC15.dll | 1019392 | F8F94FCCBFB398DFEEF31077F587385E746A8B2B4205D89EAA6D69EC23C52453 | link | success |
php_swow-php7.4-x64-ts-VC15.dll | 1042432 | D8313A21F5B33414C495018ACFA886680ACAF606384CBF036D6675E70AF350E7 | link | success |
php_swow-php7.3-x64-nts-VC15.dll | 1017856 | 2FA4F68D5F5BC8AC4B938384AB39A3B95606C30031DF6BB73CD48CE91E111D0E | link | success |
php_swow-php7.3-x64-ts-VC15.dll | 1042432 | 18E31A86E42959D7ABBD7F996C6C0CBE38291A706780296A6CC1383AE1B17484 | link | success |
The first nightly version, have fun :)
第一个每日构建版本,三八妇女节快乐~
File name | Size (in bytes) | SHA256 sum | Build log | Tests result |
---|---|---|---|---|
php_swow-php8.0-x64-nts-VS16.dll | 481792 | 3C429A0CE41792959A172F10A4D9EF72F3EEF51344996F43210C0A579586C681 | link | success |
php_swow-php8.0-x64-ts-VS16.dll | 497664 | 1E9BFA06322FACAB8B22C9F8DC4F375028FD8C73F2AD156C156D24E8555122F7 | link | success |
php_swow-php7.4-x64-nts-VC15.dll | 481280 | D8C4FF7E1F2ECBD6C5BD144D09B531F96F44B9BA3109B80C1F567FD1778DFE37 | link | success |
php_swow-php7.4-x64-ts-VC15.dll | 496640 | 4B947EEB56C074B60D96D2B9E4AAF92CF8AC980062B0AFAE6E7F54A875FBC44F | link | success |
php_swow-php7.3-x64-nts-VC15.dll | 481280 | 576B54E42F895867821A0196B38D28CE7CDAEFB2190AD59F5EA6B1D2B9457238 | link | success |
php_swow-php7.3-x64-ts-VC15.dll | 497664 | 6BB24FC9BF0595D3774FB0F9ACEF4A53C0B993AA6B8058FCB6F34264A8651845 | link | success |