Example #1
0
        private bool On_Viewer_Connect(IVNC_Socket h)
        {
            h.write(System.Text.Encoding.UTF8.GetBytes("RFB 000.000\n"));
            var id = GetID(h);

            if (id > -1)
            {
                return(Add(h, id, VNC_repeater.Utility.Host_Type.VIEWER));
            }
            return(false);
        }
Example #2
0
 private void write(IVNC_Socket n, byte[] buffer, int num_bytes)
 {
     if (num_bytes > 0)
     {
         if ((DateTime.Now - Second_Counter).TotalMilliseconds > 1000)
         {
             Second_Counter = DateTime.Now;
             _ThroughPut    = 0;
         }
         Last_Time_Heard = DateTime.Now;
         n.write(buffer, num_bytes);
         _ThroughPut            += num_bytes;
         _Total_Data_Transfered += num_bytes;
     }
 }