mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Changes
Game Data Update QueryMaster Update
This commit is contained in:
parent
523396d810
commit
f33d463782
6 changed files with 56 additions and 106 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
using System.Net;
|
||||
|
||||
namespace QueryMaster
|
||||
{
|
||||
|
|
@ -11,7 +7,7 @@ namespace QueryMaster
|
|||
internal Source(IPEndPoint address, int sendTimeOut, int receiveTimeOut) : base(address, EngineType.Source, false, sendTimeOut, receiveTimeOut) { }
|
||||
public override Rcon GetControl(string pass)
|
||||
{
|
||||
RConObj = RconSource.Authorize(socket.Address, pass);
|
||||
RConObj = RconSource.Authorize(socket.Address, pass, socket.socket.SendTimeout, socket.socket.ReceiveTimeout);
|
||||
return RConObj;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue