func NewConnector(pipe cellnet.EventPipe) cellnet.Peer { self := &socketConnector{ sessionMgr: newSessionManager(), peerProfile: newPeerProfile(pipe.AddQueue()), closeSignal: make(chan bool), } self.PostData(NewPeerEvent(Event_PeerInit, self)) return self }
func NewAcceptor(pipe cellnet.EventPipe) cellnet.Peer { self := &socketAcceptor{ sessionMgr: newSessionManager(), peerProfile: newPeerProfile(pipe.AddQueue()), } self.PostData(NewPeerEvent(Event_PeerInit, self)) return self }