Game Data Update
QueryMaster Update
This commit is contained in:
Brett Hewitson 2022-06-13 10:22:49 +10:00
parent 523396d810
commit f33d463782
6 changed files with 56 additions and 106 deletions

View file

@ -9,14 +9,14 @@ namespace QueryMaster
class RconSource : Rcon
{
internal TcpQuery socket;
private RconSource(IPEndPoint address)
private RconSource(IPEndPoint address, int sendTimeOut, int receiveTimeOut)
{
socket = new TcpQuery(address, 3000, 3000);
socket = new TcpQuery(address, sendTimeOut, receiveTimeOut);
}
internal static Rcon Authorize(IPEndPoint address, string msg)
internal static Rcon Authorize(IPEndPoint address, string msg, int sendTimeOut, int receiveTimeOut)
{
RconSource obj = new RconSource(address);
RconSource obj = new RconSource(address, sendTimeOut, receiveTimeOut);
byte[] recvData = new byte[50];
RconSrcPacket packet = new RconSrcPacket() { Body = msg, Id = (int)PacketId.ExecCmd, Type = (int)PacketType.Auth };
recvData = obj.socket.GetResponse(RconUtil.GetBytes(packet));