예제 #1
0
 public void Init()
 {
     Client       = new UDPThread(_config);
     MessageProxy = new MsgTranslator(Client, this._config);
     //与接收消息进行挂钩
     MessageProxy.MessageReceived += MessageProxy_MessageReceived;
 }
예제 #2
0
 public MsgTranslator(UDPThread udpClient, Config config)
 {
     this.Client             = udpClient;
     this._config            = config;
     ReceivedQueue           = new Queue <long>();
     Client.PackageReceived += PackageReceived;
 }