Coroutine-based cross-platform concurrent I/O engine.
APACHE-2.0 License
Bot releases are hidden (Show)
Published by twose almost 2 years ago
Full Changelog: https://github.com/swow/swow/compare/v0.3.1-alpha...v0.3.2-alpha
Published by twose almost 2 years ago
Full Changelog: https://github.com/swow/swow/compare/v0.3.0-alpha...v0.3.1-alpha
Published by twose almost 2 years ago
API向下不兼容变更:
修复:
优化:
Published by dixyes almost 2 years ago
一波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 |
Published by twose about 2 years ago
主要变化:
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 |