static private AllocSocketAddress ( |
||
endpoint | ||
loop | ||
Résultat |
public void StartListening(IPEndPoint endpoint, Action <UvArgs <TcpServerSocket> > callback = null) { try { _address = this.Loop.Allocs.Free(_address); _address = TcpSocket.AllocSocketAddress(endpoint, this.Loop); CheckError(Uvi.uv_tcp_bind(this.Handle, _address, 0)); CheckError(Uvi.uv_listen(this.Handle, this.BackLog, _connectionDelegate)); this.Status = HandleStatus.Open; _connectCallback = new UvTcpServerSocketCallback(this, callback); } catch (Exception) { _address = this.Loop.Allocs.Free(_address); } }
public void Connect(IPEndPoint endpoint, Action <UvArgs> callback = null) { this.Connect(TcpSocket.AllocSocketAddress(endpoint, this.Loop), callback); }
public void Connect(string ip, int port, Action <UvArgs> callback = null) { this.Connect(TcpSocket.AllocSocketAddress(new IPEndPoint(IPAddress.Parse(ip), port), this.Loop), callback); }