Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

UDP packet formatting  RSS feed

Amit Sharma
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am have to write a class that will allow connection to a game server. I have a description of the format of the UDP packets that need to be sent and recieved to make the connection, however, I do not know how to format the UDP datagram packets.
I searched online for quite some time, but couldn't figure out how to do this task. Any help anyone can provide would really help. Thanks in advance.
What I have to do is:
Remote App sends a UDP packet to the server on the server's port (e.g.,
The packet should start with 4 consecutive bytes of 255 (32-bit integer -1) and the string:
"challenge rcon\n".
The server will respond to the requesting system on the purported remote IP address and port with four 255's and:
"challenge rcon number\n" where number is an unsigned int32 number.
To issue the actual rcon, the remote App then responds with a UDP packet containing 4 255s and:
"rcon number \"password\" rconcommands" where password is the rcon_password ( should be enclosed in quotes as noted so that multiple word passwords will continue to work ), number is the unsigned int32 number received from the server and rconcommands is the actual rcon command string.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!