Example #1
0
        internal Peer(PeerManager peerManager, CRLFSocket socket)
        {
            this.peerManager = peerManager;
            this.state       = new GeneralState();
            this.socket      = socket;

            state.ReadLine += new EventHandler <ReadLineEventArgs>(State_ReadLine);

            socket.Closed   += new EventHandler(Socket_Closed);
            socket.ReadLine += new EventHandler <ReadLineEventArgs>(Socket_ReadLine);
        }
Example #2
0
 public Peer(PeerManager peerManager) : this(peerManager, new CRLFSocket())
 {
 }