Esempio n. 1
0
 //Send a generic type (usually a packet) to the DLL.
 public void Send <T>(T packet) where T : struct
 {
     //Make sure the pipe has been connected before sending.
     if (this._sendPipe != null && this._sendPipe.IsConnected)
     {
         //Convert the struct into bytes for sending.
         byte[] bytes = ProcessMemory.GetBytes <T>(packet);
         this.Send(bytes);
     }
 }