No, it's there. It must be there, because of the terminating 0. Sure,
currently the string itself is empty, but this is future future-proof.
> You have also neglected the fact that the s2 string should ALWAYS be
> null (or Nothing in vb.net), as per the wiki.
>
> Ronny Schedel wrote:
>> I have to correct myself, the integers for size and request ID are 4
>> byte,
>> not only 2 like in the example.
>>
>>
>>
>>> I never coded in .NET but your write functions looks a little bit
>>> overloaded. I have some experience in VBA, so is it not possible to
>>> concat
>>> the packet like this?
>>>
>>> private const SERVERDATA_EXECCOMMAND = 2
>>> private const SERVERDATA_AUTH = 3
>>>
>>> dim send_data as string
>>> send_data = chr(size_low) + chr(size_high) + chr(req_low) +
>>> chr(req_high)
>>> +
>>> chr(SERVERDATA_EXECCOMMAND) + chr(0) + string1 + chr(0) + string2 +
>>> chr(0)
>>>
>>> You have to calculate the packet size and split it in low and high byte,
>>> but
>>> it is not difficult.
>>>
>>> Best regards
>>>
>>> Ronny Schedel
>>>
>>>
>>>
>>>> I'm trying to port the PHP code I found a while back and I can't get it
>>>> to
>>>> work.
>>>>
>>>> This is what I'm using to call the functions:
>>>>
>>>> Dim rcon As New rcon_php
>>>> rcon.SetServer("127.0.0.1", 27015)
>>>> rcon.SetPassword("rconpw")
>>>> rcon.Auth()
>>>>
>>>> And my rcon_php class (or what I have so far) can be found at
>>>> http://pastebin.com/f6c334344
>>>>
>>>> The test server is running on port 27016 (UDP).
>>>>
>>>> When I try connect RCON on 27015 TCP the server closes the socket when
>>>> Auth() calls _PacketRead()
>>>>
>>>> When I try connect RCON on 27015 TCP the server actively refuses the
>>>> connection
>>>>
>>>> Note that the line m_socket = m_socket is so I can mouseover while the
>>>> program is paused and see the various properties.
>>>>
>>>>
>>>> _______________________________________________
>>>> To unsubscribe, edit your list preferences, or view the list archives,
>>>> please visit:
>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>>>
>>>>
>>> _______________________________________________
>>> To unsubscribe, edit your list preferences, or view the list archives,
>>> please visit:
>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>>
>>>
>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders