Skip to content

Releases: icicleio/socket

v0.5.3

30 Dec 05:46
Compare
Choose a tag to compare

Added

  • Icicle\Socket\NetworkSocket, Icicle\Socket\Server\BasicServer, and Icicle\Socket\Datagram\BasicDatagram will automatically free resources in the event loop associated with the server/datagram and call fclose() on the stream resource when the object is destructed. This means close() 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 to true, but can be set to false to avoid automatically calling fclose() on the resource.

v0.5.2

21 Dec 16:27
Compare
Choose a tag to compare

Added

  • Added an unshift() method to Icicle\Socket\Socket that shifts data back to the front of the stream. The data will be the first data read from any pending or subsequent read.

v0.5.1

21 Dec 06:40
Compare
Choose a tag to compare

Changed

  • Simultaneous reads are now allowed on Icicle\Socket\Datagram\BasicDatagram and simultaneous accepts are allowed on Icicle\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

05 Dec 03:26
Compare
Choose a tag to compare

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 either Basic or Default (e.g.: Icicle\Socket\Server\BasicServer and Icicle\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

03 Nov 05:04
Compare
Choose a tag to compare

New Features

  • Added a rebind() method to Icicle\Socket\Server\Server and Icicle\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

16 Oct 15:42
Compare
Choose a tag to compare

New Features

  • Added functions Icicle\Socket\connector() and Icicle\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 and Icicle\Socket\Client\ClientInterface to Icicle\Socket\Socket and Icicle\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 of Icicle\Socket\SocketInterface.

v0.3.1

04 Sep 20:45
Compare
Choose a tag to compare

Bug Fixes

  • Fixed typo in line that prevents functions from being defined twice.

v0.3.0

04 Sep 18:47
Compare
Choose a tag to compare

New Features

  • Added some socket utility functions in the Icicle\Socket namespace. Notably Icicle\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 in icicleio/stream v0.3.0).

v0.2.1

25 Aug 00:22
Compare
Choose a tag to compare

Changes

  • fclose() is no longer automatically called by Socket::__destruct(), Socket::close() must be called to invoke fclose() on the socket.

v0.2.0

19 Aug 05:11
Compare
Choose a tag to compare

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 the receive() and send() methods of Icicle\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.