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
ファイル: Form1.cs プロジェクト: AnthonyNystrom/MobiVU
        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;
 }