public EzySocketClient()
 {
     this.ticketsQueue     = newTicketsQueue();
     this.codecCreator     = newCodecCreator();
     this.socketReader     = newSocketReader();
     this.socketWriter     = newSocketWriter();
     this.dataEventQueue   = new EzyQueue <EzySocketDataEvent>();
     this.statusEventQueue = new EzyQueue <EzySocketStatusEvent>();
     this.socketReader.setDataEventQueue(dataEventQueue);
     this.socketReader.setStatusEventQueue(statusEventQueue);
     this.socketReader.setDecoder(codecCreator.newDecoder(Int32.MaxValue));
     this.socketWriter.setTicketsQueue(ticketsQueue);
     this.socketWriter.setEncoder(codecCreator.newEncoder());
 }
 public void setStatusEventQueue(EzyQueue <EzySocketStatusEvent> statusEventQueue)
 {
     this.statusEventQueue = statusEventQueue;
 }
 public void setDataEventQueue(EzyQueue <EzySocketDataEvent> dataEventQueue)
 {
     this.dataEventQueue = dataEventQueue;
 }
Esempio n. 4
0
 public EzySocketReader()
 {
     this.dataQueue           = new EzySynchronizedQueue <EzyArray>();
     this.readBufferSize      = EzySocketConstants.MAX_READ_BUFFER_SIZE;
     this.decodeBytesCallback = message => onMesssageReceived(message);
 }
Esempio n. 5
0
 public EzyUdpSocketReader() : base()
 {
     this.dataQueue      = new EzySynchronizedQueue <EzyArray>();
     this.serverEndPoint = new IPEndPoint(IPAddress.Any, 0);
     this.readBufferSize = EzySocketConstants.MAX_READ_BUFFER_SIZE;
 }