コード例 #1
0
 private void ReceiveImage()
 {
     try
     {
         while (true)
         {
             if (IsClosed)
             {
                 return;
             }
             byte[] packet            = mSocketTalker.ReceivePacket();
             Image  image             = BitmapUtils.ConvertFromBytes(packet);
             OnImageReceivedArgs args = new OnImageReceivedArgs();
             args.ReceivedImage = image;
             mForm.Invoke(mOnImageReceivedHandler, this, args);
         }
     }
     catch (Exception e)
     {
         Close(e);
     }
 }