public TradingBusServer(int listen_port_number) { request_handler = new TradingRequestHandler(this); request_handler.Start(); listener = new ConnectionTradingListener(request_handler, listen_port_number); listener.Start(); }
public ConnectionTradingOnServer(TcpClient client, TradingRequestHandler handler) { this.client = client; this.connection_reader = new ConnectionReader(new BinaryReader(client.GetStream()), this); this.connection_writer = new ConnectionWriter(new BinaryWriter(client.GetStream())); this.handler = handler; }
public ConnectionTradingListener(TradingRequestHandler handler, int port_number) { this.Handler = handler; this.listener = new TcpListener(IPAddress.Parse("127.0.0.1"), port_number); this.listener.Start(); }