Ejemplo n.º 1
0
 public TCPResponder(EndPoint ep)
 {
     listenSocket_ = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
     listen_ep_    = ep;
     listenSocket_.Bind(listen_ep_);
     service_queue      = new BlockingQueue <Task <bool> >();
     ch_                = null;
     isListening        = new AtomicBool(false);
     numClients         = new Atomic <int>(-1);
     useClientRecvQueue = new AtomicBool(true);
     useClientSendQueue = new AtomicBool(true);
 }
Ejemplo n.º 2
0
        public TCPConnector()
        {
            socket    = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            sendQueue = new BlockingQueue <Message>();
            recvQueue = new BlockingQueue <Message>();

            isReceiving = new AtomicBool(false);
            isSending   = new AtomicBool(false);

            useRecvQueue = new AtomicBool(true);
            useSendQueue = new AtomicBool(true);
        }
Ejemplo n.º 3
0
        public ClientHandler()
        {
            sendQ_ = new BlockingQueue <Message>();
            recvQ_ = new BlockingQueue <Message>();

            isReceiving = new AtomicBool();
            isSending   = new AtomicBool();

            service_ep_ = null;

            client_socket = null;
        }