public XConnection OnAccept(Socket socket, IPEndPoint source) { var inbound = new XConnection(this); inbound.TcpSocket = socket; inbound.RemoteIP = source.Address; inbound.SetConnected(); // it's not until the host sends us traffic that we can send traffic back because we don't know // connecting node's dhtID (and hence encryption key) until ping is sent lock (Connections) Connections.Add(inbound); Log("Accepted Connection from {0}", inbound); return(inbound); }
public XConnection OnAccept(Socket socket, IPEndPoint source) { var inbound = new XConnection(this); inbound.TcpSocket = socket; inbound.RemoteIP = source.Address; inbound.SetConnected(); // it's not until the host sends us traffic that we can send traffic back because we don't know // connecting node's dhtID (and hence encryption key) until ping is sent lock (Connections) Connections.Add(inbound); Log("Accepted Connection from {0}", inbound); return inbound; }