public void ExecCommand(string cmd) { using (var packet = new SourceRCONPacket(1, 2)) { var data = Encoding.Default.GetBytes(cmd); packet.Write(data, 0, data.Length); Send(packet); } }
public void Authenticate(string password) { using (var packet = new SourceRCONPacket(0, 3)) { var data = Encoding.Default.GetBytes(password); packet.Write(data, 0, data.Length); Send(packet); } }