• Welcome to Valhalla Legends Archive.
 

Need help on UDP.

Started by G-Unit, June 16, 2003, 08:46 PM

Previous topic - Next topic

G-Unit

I have spent weeks trying to get some info on UDP but I havent been able to find any.

1. Can someone please tell me what UDP is?
2. What packet/info must I send to enable UDP support for starcraft?

Thanks.

UserLoser

#1
Assuming your using VB...
1) Add a Winsock object to your form.
2) To 'enable' it, use this example below

With frmBot
       .sckUDP.RemoteHost = Server
       .sckUDP.RemotePort = 6112
       .sckUDP.Bind 6112
End With

3) You should do that at the same time, if not before your main socket connects to Battle.net
4) On the UDP socket, you will recieve the UDP Code [0x5] which is the UDP Code used for 0x14, which is usually always 'tenb', or 'bnet' backwards
5) Upon recieving 0x50, send UDP packet 0x9, which is the 3rd, and 4th DWORD of the 0x50 response from the server.

Game) To establish a UDP connection for in a game, send 0x09 to request the game info about the game you are wanting to join, in the packet yo get back, Battle.net will send you the game info, including the IP address and the port to use (Usually 6112).  After you binded the connection to the host of the game, [This is the way I take it], you keep sending UDP packet 0x3 [Ping] until the host replies with it (This way you get their ping)...

After that, there is a lot more to it, I'm just doing this all from memory, so don't expect it all to be correct

----
Don't know why [CODE] tags are not working...Disable smilies is checked...

G-Unit


UserLoser


Dark-Feanor

Why would you want to use UDP support on a battle.net emulation client?
- Feanor[xL]
clan exile
Firebot
iago: "caps lock is like cruise control for cool"

Banana fanna fo fanna

Perhaps to join games?

It's not hard at all to respond to the basic game list pings.