Skip to content

Releases: amphp/socket

2.3.1

21 Apr 14:42
v2.3.1
58e0422
Compare
Choose a tag to compare

What's Changed

  • Make implicit nullable types explicit to avoid deprecation notice in PHP 8.4.

Full Changelog: v2.3.0...v2.3.1

1.2.1

21 Mar 18:59
v1.2.1
b00528b
Compare
Choose a tag to compare

What's Changed

Full Changelog: v1.2.0...v1.2.1

2.3.0

19 Mar 20:07
v2.3.0
acc0a2f
Compare
Choose a tag to compare
  • Added Socks5SocketConnector to connect to hosts via SOCKS5 proxies. A similar implementation was previously present in amphp/http-tunnel.

2.2.4

28 Feb 15:58
v2.2.4
4223324
Compare
Choose a tag to compare

What's Changed

  • Removed missed call to stream_context_set_option(), which was causing a deprecation notice on PHP 8.3.

Full Changelog: v2.2.3...v2.2.4

2.2.3

17 Feb 04:52
v2.2.3
40c80bd
Compare
Choose a tag to compare

What's Changed

  • Updated deprecated use of stream_context_set_option() on PHP 8.3.

Full Changelog: v2.2.2...v2.2.3

2.2.2

31 Dec 18:17
v2.2.2
eb6c5e6
Compare
Choose a tag to compare

What's Changed

  • Fixed bind errors being hidden when connecting in DnsSocketConnector ( #108).

Full Changelog: v2.2.1...v2.2.2

2.2.1

16 Dec 18:26
v2.2.1
88ca6d2
Compare
Choose a tag to compare

What's Changed

  • Updated the default chunk size in ResourceUdpSocket to match the maximum UDP payload length.

Full Changelog: v2.2.0...v2.2.1

2.2.0

19 Aug 15:32
v2.2.0
3418a0c
Compare
Choose a tag to compare

What's Changed

  • Add support for league/uri 7.x
  • Undefined variable $socket in example by @61-6c-69 in #106

New Contributors

Full Changelog: v2.1.0...v2.2.0

2.1.0

08 Apr 09:17
v2.1.0
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.0...v2.1.0

2.0.0

01 Feb 00:03
v2.0.0
d43bbbe
Compare
Choose a tag to compare

Stable release compatible with AMPHP v3 and fibers! 🎉

As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType> have been replaced with ResolutionType.

See some of the changes in v2.0 of amphp/byte-stream since this library extends several of the interfaces in that library, particularly ReadableStream and WritableStream.

  • Moved methods from the EncryptableSocket interface to Socket and removed EncryptableSocket
  • Changed SocketAddress to an interface with two implementations: InternetAddress and UnixAddress
    • These implementations can be differentiated using SocketAddress::getType(), which returns an enum SocketAddressType with cases Unix and Internet
    • SocketAddress static constructors have been relocated as functions in the Amp\Socket\SocketAddress namespace.
  • Added connectTls function
  • Added bindUdpSocket function
  • Added ResourceUdpSocket and UdpSocket interface
  • Added ServerSocketFactory interface for creating ServerSocket instances along with an implementation ResourceServerSocketFactory
  • Renamed createPair function to createSocketPair
  • Renamed connector to socketConnector
  • Renamed Server to ResourceServerSocket and introduced ServerSocket interface
    • ResourceServerSocket::__construct() requires a BindContext instance
  • Renamed Connector to SocketConnector
  • Renamed DnsConnector to DnsSocketConnector
  • Renamed StaticConnector to StaticSocketConnector
  • Removed chunk size from BindContext, use chunk size parameters on listen / bindUdpSocket instead
  • Max attempts has been removed from ConnectContext in favor of a constructor parameter to RetrySocketConnector
  • DnsSocketConnector now tries each host returned from a DNS query a single time before failing. Retrying the list is accomplished through a new connector implementation, RetrySocketConnector that can be configured to retry a given number of times with an exponential backoff between attempts.
  • Default required TLS version is now 1.2+ instead of 1.0+

Changes from 2.0.0 Beta 9

  • Moved methods from the EncryptableSocket interface to Socket and removed EncryptableSocket
  • Renamed SocketServer to ServerSocket
  • Renamed SocketServerFactory to ServerSocketFactory