Inheritance: OtpLocalNode
コード例 #1
0
        /*
         * Intiate and open a connection to a remote node.
         *
         * @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, OtpPeer other) : base(self, other)
        {
            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         = "connection2 " + self.node() + " -> " + other.node();
            t.Start();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
ファイル: OtpConnection.cs プロジェクト: saneman1/otp.net
		/*
		* Intiate and open a connection to a remote node.
		*
		* @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, OtpPeer other):base(self, other)
		{
			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 = "connection2 "+self.node()+" -> "+other.node();
			t.Start();
		}
コード例 #4
0
ファイル: OtpConnection.cs プロジェクト: saneman1/otp.net
		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();
		}
コード例 #5
0
ファイル: OtpPeer.cs プロジェクト: saleyn/otp.net
        /*
        * Create a connection to a remote node.
        *
        * @param self the local node from which you wish to connect.
        *
        * @return a connection to the remote node.
        *
        * @exception java.net.UnknownHostException if the remote host could
        * not be found.
		
        * @exception java.io.IOException if it was not possible to connect
        * to the remote node.
		
        * @exception OtpAuthException if the connection was refused by the
        * remote node.
        *
        @deprecated Use the corresponding method in {@link OtpSelf} instead.
        **/
		public virtual OtpConnection connect(OtpSelf self)
		{
			return new OtpConnection(self, this);
		}
コード例 #6
0
 /*
  * Create a connection to a remote node.
  *
  * @param self the local node from which you wish to connect.
  *
  * @return a connection to the remote node.
  *
  * @exception java.net.UnknownHostException if the remote host could
  * not be found.
  *
  * @exception java.io.IOException if it was not possible to connect
  * to the remote node.
  *
  * @exception OtpAuthException if the connection was refused by the
  * remote node.
  *
  * @deprecated Use the corresponding method in {@link OtpSelf} instead.
  **/
 public virtual OtpConnection connect(OtpSelf self)
 {
     return(new OtpConnection(self, this));
 }
コード例 #7
0
ファイル: OtpServer.cs プロジェクト: e42s/jungerl
 /*Create an {@link OtpServer} from an existing {@link OtpSelf}.
 *
 * @param self an existing self node.
 *
 * @exception C#.io.IOException if a ServerSocket could not be created.
 *
 **/
 public OtpServer(OtpSelf self)
     : base(self.node(), self.cookie())
 {
 }
コード例 #8
0
ファイル: OtpServer.cs プロジェクト: trompa/jungerl
 /*Create an {@link OtpServer} from an existing {@link OtpSelf}.
  *
  * @param self an existing self node.
  *
  * @exception C#.io.IOException if a ServerSocket could not be created.
  *
  **/
 public OtpServer(OtpSelf self) : base(self.node(), self.cookie())
 {
 }