Ejemplo n.º 1
0
 private void SendInfo()
 {
     builder.Clear();
     builder
     .AddJoystickDTO(JoystickBuilder.JoystickDTO)
     .AddSensorDTO(SensorBuilder.SensorDTO);
     ProtocolSender.Send(builder.Result(), NetworkColletion.Instance.TcpConnection);
 }
Ejemplo n.º 2
0
        private void TcpConnection_OnDataReceive(object sender, byte[] e)
        {
            DataReceive.SetDataProtocol(ConvertProtocol.BytesToIDataReceiveProtocol(e));

            if (_tcpDTO.Time < 0)
            {
                builder.Clear();
                builder
                .AddJoystickDTO(JoystickBuilder.JoystickDTO)
                .AddSensorDTO(SensorBuilder.SensorDTO);
                ProtocolSender.Send(builder.Result(), NetworkColletion.Instance.TcpConnection);
            }
        }