protected internal GenericQueue queue; // messages get delivered here /* * Accept an incoming connection from a remote node. Used by {@link * OtpSelf#accept() OtpSelf.accept()} to create a connection * based on data received when handshaking with the peer node, when * the remote node is the connection intitiator. * * @exception C#.io.IOException if it was not possible to connect to the peer. * * @exception OtpAuthException if handshake resulted in an authentication error */ // package scope internal OtpConnection(OtpSelf self, System.Net.Sockets.TcpClient s) : base(self, s) { this._self = self; this.queue = new GenericQueue(); System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(Start)); t.IsBackground = true; t.Name = "connection " + self.node() + " | " + s.ToString(); t.Start(); }
/* * Accept an incoming connection from a remote node. Used by {@link * OtpSelf#accept() OtpSelf.accept()} to create a connection * based on data received when handshaking with the peer node, when * the remote node is the connection intitiator. * * @exception C#.io.IOException if it was not possible to connect to the peer. * * @exception OtpAuthException if handshake resulted in an authentication error */ // package scope internal OtpCookedConnection(OtpNode self, System.Net.Sockets.TcpClient s) : base(self, s) { this.self = self; this.links = new Links(25); this.monitors = new System.Collections.Hashtable(49, (float)0.95); thread = new System.Threading.Thread(new System.Threading.ThreadStart(Start)); thread.IsBackground = true; thread.Name = "cooked connection " + self.node() + " | " + s.ToString(); thread.Start(); }
private void _receiver_ClientDisconnected(object sender, System.Net.Sockets.TcpClient e) { Debug.WriteLine($"Client disconnected: {e.ToString()}"); }