Releases: amphp/socket
2.0.0 Beta 9
- Fixed compatibility with
v2.0
ofamphp/dns
- Fixed
DnsException
being thrown fromDnsSocketConnector
if DNS resolution failed. AConnectException
will be thrown instead with theDnsException
as the previous exception - Fixed TLS state being incorrect in
ResourceSocket
if TLS setup fails
2.0.0 Beta 8
- Fixed compatibility with
v2.0
ofamphp/byte-stream
by updatingResourceSocket
to implementTraversable
.
2.0.0 Beta 7
- Added compatibility with Revolt v1.x
- Improved accept stack traces for debugging
- Fixed
InternetAddress::fromString
always failing (#94)
2.0.0 Beta 6
Update for Closable
interface being moved from amphp/byte-stream
to amphp/amp
.
SocketServer
andDatagramSocket
now extendAmp\Closable
instead ofAmp\ByteStream\Closable
.
2.0.0 Beta 5
- Fixed compatibility with systems not defining
EAGAIN
, e.g. Windows
2.0.0 Beta 4
-
Updated interfaces extending
ClosableStream
(which was renamed toClosable
in amphp/byte-stream) to include theonClose
method which was added to the interface. -
SocketAddress
has been changed to an interface with two implementations -InternetAddress
andUnixAddress
. These can be differentiated usingSocketAddress::getType()
, which returns an enumSocketAddressType
with casesUnix
andInternet
. -
SocketAddress
static constructors have been relocated as functions in theAmp\Socket\SocketAddress
namespace. -
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. -
Max attempts has been removed from
ConnectContext
in favor of a constructor parameter toRetrySocketConnector
. -
Added
SocketServerFactory
interface for creatingSocketServer
instances, along with an implementationResourceSocketServerFactory
. -
EncryptableSocket::getTlsState()
now returns an enumTlsState
with cases corresponding to the prior constants defined inEncryptableSocket
, which have been removed.
2.0.0 Beta 3
- Require PHP 8.1+
- Add
ServerSocket::getBindContext()
- Require
BindContext
inResourceSocketServer::__construct()
- Add
ServerTlsContext::fromServerResource()
- Improve
DnsSocketConnector
error messages to include IP addresses - Automatically determine DNS type if
bindTo
option is used for connections
2.0.0 Beta 2
- Update to
revolt/event-loop
0.2.x
2.0.0 Beta 1
- Based on fibers instead of promises, so return types changed to avoid
Promise
- Default to TLSv1.2+ instead of TLSv1.0+
- Added
connectTls
function - Added
bindDatagram
function - Added
ResourceDatagramSocket
andDatagramSocket
interface - Renamed
createPair
function tocreateSocketPair
- Renamed
connector
function tosocketConnector
- Renamed
Server
toResourceSocketServer
and introducedSocketServer
interface - Renamed
Connector
toSocketConnector
- Renamed
DnsConnector
toDnsSocketConnector
- Renamed
StaticConnector
toStaticSocketConnector
- Removed chunk size from
BindContext
, use parameters onlisten
/bindDatagram
instead