This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes UDP packet formatting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "UDP packet formatting" Watch "UDP packet formatting" New topic
Author

UDP packet formatting

Amit Sharma
Greenhorn

Joined: Nov 04, 2002
Posts: 1
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., 127.0.0.1:27015):
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UDP packet formatting
 
Similar Threads
TCP, UDP,IP
Pinger time!
Calulate net speed through applet
developing tftp application in java
Reading and writing to a socket concurrently