Hprose\Swoole\Socket\Transporter::create PHP Method

create() public method

public create ( )
    public function create()
    {
        $client = $this->client;
        $conn = new swoole_client($client->type, SWOOLE_SOCK_ASYNC);
        // The type is changed after new swoole_client in old version swoole.
        // The new version swoole is fixed this bug.
        $client->type &= 0xff;
        if ($client->type !== SWOOLE_UNIX_STREAM) {
            $client->settings['open_tcp_nodelay'] = $client->noDelay;
        }
        $client->settings['open_eof_check'] = false;
        $client->settings['open_length_check'] = false;
        $client->settings['open_eof_split'] = false;
        $conn->set($client->settings);
        $this->setReceiveEvent($conn);
        $this->size++;
        return $conn;
    }