Skip to content

Consistent addressing scheme #199

@clue

Description

@clue

Currently, react is inconsistent in how remote or local sockets are addressed:

  • SocketClient: Connector::create($ip, $port) (TCP)
  • SocketClient: SecureConnector::create($ip, $port) (SSL/TLS via TCP)
  • Socket: Server::listen($port, $ip) (TCP, notice the reverse order)
  • Socket PR: Server::listenUnix($path) (UNIX)
  • Socket PR: Server::__construct($loop, $context = array()) (SSL/TLS via TCP)
  • DNS: Factory($address) (ip and port, internally uses both TCP and UDP)
  • Socket: Connection::getAddress() returns only the IP, with no access to the port
  • Socket: Server::getPort() returns only the port, with no access to the IP

Instead, I'd like to vote for a consistent naming scheme throughout react's subprojects. It should support addresses that include schemes (SSL/TLS), IPv4/IPv6 addressing, optional port numbers, local UNIX socket paths, etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions