Example #1
0
 // Token: 0x06000152 RID: 338 RVA: 0x0000C6A8 File Offset: 0x0000A8A8
 public void run()
 {
     while (Session_ME.connected)
     {
         try
         {
             if (Session_ME.getKeyComplete)
             {
                 while (this.sendingMessage.Count > 0)
                 {
                     Message m = this.sendingMessage[0];
                     Session_ME.doSendMessage(m);
                     this.sendingMessage.RemoveAt(0);
                 }
             }
             try
             {
                 Thread.Sleep(5);
             }
             catch (Exception ex)
             {
                 Cout.LogError(ex.ToString());
             }
         }
         catch (Exception)
         {
             Res.outz("error send message! ");
         }
     }
 }
Example #2
0
 // Token: 0x06000144 RID: 324 RVA: 0x0000C264 File Offset: 0x0000A464
 public void doConnect(string host, int port)
 {
     Session_ME.sc = new TcpClient();
     Session_ME.sc.Connect(host, port);
     Session_ME.dataStream = Session_ME.sc.GetStream();
     Session_ME.dis        = new BinaryReader(Session_ME.dataStream, new UTF8Encoding());
     Session_ME.dos        = new BinaryWriter(Session_ME.dataStream, new UTF8Encoding());
     new Thread(new ThreadStart(Session_ME.sender.run)).Start();
     Session_ME.MessageCollector @object = new Session_ME.MessageCollector();
     Cout.LogError("new -----");
     Session_ME.collectorThread = new Thread(new ThreadStart(@object.run));
     Session_ME.collectorThread.Start();
     Session_ME.timeConnected = Session_ME.currentTimeMillis();
     Session_ME.connecting    = false;
     Session_ME.doSendMessage(new Message(-27));
 }