Rover.TCPServer.TCPServer C# (CSharp) Method

TCPServer() public method

TCP server constuctor, this instanciate the server on the specified port.
public TCPServer ( int Port, TransmittedCBType aTransmittedCBHandler, ReceivedCBType aReceivedCBHandler, ClientFoundCBType aClientFoundCBHandler, ClientLostCBType aClientLostCBHandler ) : System
Port int
aTransmittedCBHandler TransmittedCBType
aReceivedCBHandler ReceivedCBType
aClientFoundCBHandler ClientFoundCBType
aClientLostCBHandler ClientLostCBType
return System
        public TCPServer(int Port, TransmittedCBType aTransmittedCBHandler, ReceivedCBType aReceivedCBHandler, ClientFoundCBType aClientFoundCBHandler, ClientLostCBType aClientLostCBHandler)
        {
            this.tcpListener = new TcpListener(IPAddress.Any, Port);
            this.ServerListeningThread = new Thread(new ThreadStart(ServerListeningThreadHandler));

            this.aReceivedCBHandler = aReceivedCBHandler;
            this.aTransmittedCBHandler = aTransmittedCBHandler;
            this.aClientFoundCBHandler = aClientFoundCBHandler;
            this.aClientLostCBHandler = aClientLostCBHandler;

            //start server listening thread
            this.ServerListeningThread.Start();
        }