public function create($domain, $type, $protocol)
    {
        $this->socket = socket_create($domain, $type, $protocol);
        if (!$this->socket) {
            throw new \Exception('Could not create socket');
        }
    }
public function create($domain, $type, $protocol)
    {
        $this->socket = socket_create($domain, $type, $protocol);
        if (!$this->socket) {
            throw new \Exception('Could not create socket');
        }
    }
public function create ( $ domain , $ type , $ protocol ) { $ this -> socket = socket_create ( $ domain , $ type , $ protocol ) ; if ( ! $ this -> socket ) { throw new \ Exception ( 'Could not create socket' ) ; } }
Creates new socket connection

@see http://php.net/manual/en/function.socket-create.php

@param int $domain   Protocol family
@param int $type     Type of socket
@param int $protocol Communication protocol

@throws \Exception If the socket could not be created
Creates new socket connection