Releases: icicleio/socket
Releases · icicleio/socket
v0.5.3
Added
Icicle\Socket\NetworkSocket
,Icicle\Socket\Server\BasicServer
, andIcicle\Socket\Datagram\BasicDatagram
will automatically free resources in the event loop associated with the server/datagram and callfclose()
on the stream resource when the object is destructed. This meansclose()
does not need to be called on the object to avoid memory leaks in the loop or close the resource. The constructors of these classes have an additional boolean parameter$autoClose
that defaults totrue
, but can be set tofalse
to avoid automatically callingfclose()
on the resource.
v0.5.2
v0.5.1
Changed
- Simultaneous reads are now allowed on
Icicle\Socket\Datagram\BasicDatagram
and simultaneous accepts are allowed onIcicle\Socket\Server\BasicServer
, fulfilling in the order they were created. Simultaneous reads/accepts will not fulfill with the same data, rather each is fulfilled independently with new data read from the stream or new client accepted on the server.
v0.5.0
Changes
- All interface names have been changed to remove the
Interface
suffix. Since most classes in this package would now conflict with the interface names, the classes are prefixed with eitherBasic
orDefault
(e.g.:Icicle\Socket\Server\BasicServer
andIcicle\Socket\Connector\DefaultConnector
).
New Features
- Improved enabling crypto on
Icicle\Socket\NetworkSocket
to force the highest TLS version supported by the client and allowed by the$method
parameter to be selected by the server.
v0.4.1
New Features
- Added a
rebind()
method toIcicle\Socket\Server\Server
andIcicle\Socket\Datagram\Datagram
that rebinds the object to the current event loop instance. This method should be used if the event loop is switched out during runtime (for example, when forking using the concurrent package).
v0.4.0
New Features
- Added functions
Icicle\Socket\connector()
andIcicle\Socket\connect()
. These functions are used to access and set a global connector object and use that object to connect to remote servers.
Changes
- Moved stream socket classes to the
icicleio/stream
package. - Renamed
Icicle\Socket\Client\Client
andIcicle\Socket\Client\ClientInterface
toIcicle\Socket\Socket
andIcicle\Socket\SocketInterface
. These names better represent the purpose of the class and interface (as they are not strictly for client connections, but remote sockets in general). Icicle\Socket\Server\ServerInterface::accept()
now resolves to an instance ofIcicle\Socket\SocketInterface
.
v0.3.1
v0.3.0
New Features
- Added some socket utility functions in the
Icicle\Socket
namespace. NotablyIcicle\Socket\pair()
that returns a pair of connected stream sockets.
Changes
- Objects no longer bind to the event loop until needed. This will allow a server to be created or a client to be accepted, then sent to a thread with a separate event loop.
- The byte parameter must be a single-byte string. Use
chr()
to convert an integer to a single ascii character (change made inicicleio/stream
v0.3.0).
v0.2.1
v0.2.0
Changes
- Stream methods previously returning promises are now coroutines, matching the changes made to stream interfaces in
icicleio/stream
v0.2.0. Icicle\Socket\Server\ServerInterface::accept()
is now a coroutine, as well as thereceive()
andsend()
methods ofIcicle\Socket\Datagram\DatagramInterface
.
Bug Fixes
- Fixed an issue where the internal socket event object was not freed if the coroutine
Icicle\Socket\Client\Connector::connect()
was cancelled.