예제 #1
0
 public MessageQueue(MessageQueueConfig config, ILog logger, IDictionary <long, PlayerSession> sessionDIc)
 {
     _sessionDicRef = sessionDIc;
     _logger        = logger;
     Port           = config.Port;
     Name           = config.Name;
     AllowedIPs     = config.AllowedIPArray.Split(new [] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();
     _listener      = new TcpListener(IPAddress.Any, Port);
     _thread        = new TaskThread(Name, OnReceived);
     _buffer        = new byte[DefaultBufferSize];
 }
예제 #2
0
 public MessageQueue(MessageQueueConfig config, ILog logger, IDictionary<long, PlayerSession> sessionDIc)
 {
     _sessionDicRef = sessionDIc;
     _logger = logger;
     Port = config.Port;
     Name = config.Name;
     AllowedIPs = config.AllowedIPArray.Split(new []{','}, StringSplitOptions.RemoveEmptyEntries).ToList();
     _listener = new TcpListener(IPAddress.Any, Port);
     _thread = new TaskThread(Name, OnReceived);
     _buffer = new byte[DefaultBufferSize];
 }