コード例 #1
0
 public TradingBusServer(int listen_port_number)
 {
     request_handler = new TradingRequestHandler(this);
     request_handler.Start();
     listener = new ConnectionTradingListener(request_handler, listen_port_number);
     listener.Start();
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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();
 }