Exemple #1
0
 public void UpdateCam()
 {
     try
     {
         MemoryStream ms     = camera.GrabImage();
         byte[]       datas  = ms.GetBuffer();
         int          length = datas.Length;
         for (int i = 0; i < 4; i++, length >>= 8)
         {
             head[i] = (byte)(length & 255);
         }
         ns.Write(head, 0, head.Length);
         ns.Write(datas, 0, datas.Length);
         ms.Close();
     }
     catch { }
 }