v0.3.0
版本发布时间: 2018-07-06 00:09:19
reactphp/reactphp最新发布版本:v1.4.0(2023-07-12 00:11:33)
- BC break: [EventLoop] New timers API (@nrk)
- BC break: [EventLoop] Remove check on return value from stream callbacks (@nrk)
- BC break: [HttpClient] Socket connection handling moved to new SocketClient component
- Feature: [SocketClient] New SocketClient component extracted from HttpClient (@clue)
- Feature: [Stream] Factory method for BufferedSink
EventLoop
-
The timer callback now receives a
Timer
instance, with the following useful methods:-
cancel
-
isActive
-
setData($data)
-
getData
And some other less common ones. These are prefered over
LoopInterface::cancelTimer
andLoopInterface::isTimerActive
. -
-
You can no longer return a boolean from a periodic timer callback to abort it.
HttpClient
-
HttpClient\*ConnectionManager
has been moved toSocketClient\*Connector
, and thegetConnection
method has been renamed tocreate
.Before:
$connectionManager->getConnection($host, $port);
After:
$connector->create($host, $port);