CoreRcon icon indicating copy to clipboard operation
CoreRcon copied to clipboard

Exception Specified argument was out of the range of valid values

Open PIN0L33KZ opened this issue 4 years ago • 2 comments

Hi, i have a quick question. I created a RCON Client but if i add the TCP Timeout parameter and want to connect to a Server, i get this error:

Exception Specified argument was out of the range of valid values. Parameter name: offset

I used this to create the client:

Private rconclient As New RCON(IPAddress.Parse(_ip), _port, _passwd, tcpTimeout:=10000)

Greetings :)

PIN0L33KZ avatar Jun 05 '21 20:06 PIN0L33KZ

Hello! Could you give some more details? What game server are you trying to connect to? Do you get any more information about where the exception is thrown?

xobust avatar Jun 10 '21 21:06 xobust

Hi,

I want to connect to a Minecraft Server, and if i add the tcp timeout parameter and try to connect, i´ll get this exception.

Exception Specified argument was out of the range of valid values. Parameter name: offset


This is the code that is used to create the client:

Private rconclient As New RCON(IPAddress.Parse(_ip), _port, _passwd, _timeout)

If the Button "connect" is pressed:

Async Sub _connect()

        _ip = tb_ip.Text
        _port = Convert.ToUInt64(tb_port.Text)
        _passwd = tb_passwd.Text
       _timeout = 10000
	rconclient = New RCON(IPAddress.Parse(_ip), _port, _passwd, _timeout)
		
            Try
		Await rconclient.ConnectAsync 'This is where the exception is thrown'
            Catch ex As Exception
                 rtb_output.Text += "Connection Failed. Can't reach RCON Service" & Environment.NewLine
	       Exit Sub
            End Try			
    End Sub

PIN0L33KZ avatar Jun 11 '21 14:06 PIN0L33KZ