Wrench\Socket\Socket::getPort PHP Method

getPort() public method

Gets the port of the socket
public getPort ( ) : string
return string
    public function getPort()
    {
        $name = $this->getName();
        if ($name) {
            return self::getNamePart($name, self::NAME_PART_PORT);
        } else {
            throw new SocketException('Cannot get socket IP address');
        }
    }