Skip to content

v0.4.0

Compare
Choose a tag to compare
@clue clue released this 21 Mar 09:44
· 2 commits to deprecated since this release
  • BC break: Unified socket addresses (string URIs instead of host+port)
    (#5):
    • The Factory now only accepts a single-argument full socket address (i.e. host:port for UDP/IP):

      // Previously:
      $factory->createServer(1337, 'localhost')->then(…);
      $factory->createClient('localhost', 1337)->then(…);
      // Now:
      $factory->createServer('localhost:1337')->then(…);
      $factory->createClient('localhost:1337')->then(…);
    • The methods Socket::getAddress() and Socket::getPort() have been removed.

    • Instead, the following two methods have been introduced which both return
      a full socket address:

      • SocketInterface::getLocalAddress()
      • SocketInterface::getRemoteAddress()
  • Small refactoring to ease extending base classes
    (#4)