TCPServer is the Server class. When "StartServer" method is called this Server object tries to connect to a IP Address specified on a port configured. Then the server start listening for client socket requests. As soon as a requestcomes in from any client then a Client Socket Listening thread will be started. That thread is responsible for client communication.
예제 #1
0
 /// <summary>
 /// Client Socket Listener Constructor.
 /// </summary>
 /// <param name="clientSocket">Phone connection</param>
 public TCPSocketListener(Socket clientSocket, TCPServer server)
 {
     m_Server = server;
     m_clientSocket = clientSocket;
 }
예제 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // init ip socket server
            //IPAddress ip = IPAddress.Parse("192.168.2.3");
            _sockServer = new TCPServer(8082);
            _udpServer = new UDPServer();

            _udpServer.StartServer();
            _sockServer.StartServer();
            timer1.Enabled = true;
        }
예제 #3
0
 /// <summary>
 /// Client Socket Listener Constructor.
 /// </summary>
 /// <param name="clientSocket">Phone connection</param>
 public TCPSocketListener(Socket clientSocket, TCPServer server)
 {
     m_Server       = server;
     m_clientSocket = clientSocket;
 }