コード例 #1
0
 static public void StartServer(string ipaddr, int portno, MemoryFifo in_fifo, MemoryFifo out_fifo)
 {
     if (SerialServer.server != null)
     {
         throw new InvalidOperationException();
     }
     SerialServer.server = new Server
     {
         Services = { SerialService.BindService(new SerialServer(in_fifo, out_fifo)) },
         Ports    = { new ServerPort(ipaddr, portno, ServerCredentials.Insecure) }
     };
     server.Start();
 }
コード例 #2
0
 public void Open()
 {
     this.in_fifo  = new MemoryFifo(this.memory_size);
     this.out_fifo = new MemoryFifo(this.memory_size);
     SerialServer.StartServer(server_ipaddr, server_portno, this.in_fifo, this.out_fifo);
 }
コード例 #3
0
 public SerialServer(MemoryFifo inf, MemoryFifo outf) : base()
 {
     this.in_fifo  = inf;
     this.out_fifo = outf;
 }