Beispiel #1
0
 public NetManager()
 {
     buffer      = new ByteBuffer();
     tcpConsumer = new SocketDataConsumer();
     socket      = new SocketClient();
     tcpHandler  = new TcpHandler(tcpConsumer);
     socket.init(Configuration.tcpHost, Configuration.tcpPort, tcpHandler);
     //listener = new DefaultSocketListener(tcpConsumer);
 }
 public DefaultSocketListener(SocketDataConsumer consumer)
 {
     this.consumer = consumer;
     length        = 100;
     producerQueue = new object[length];
 }