Staredit Network > Forums > General StarCraft > Topic: Game networking
Game networking
Aug 12 2015, 1:02 am
By: iCCup.xboi209  

Aug 12 2015, 1:02 am iCCup.xboi209 Post #1



What version of Winsock and which functions does SC use to send and receive ingame packets?



None.

Aug 13 2015, 8:21 pm Neiv Post #2



SC uses UDP, so it would be reasonable to expect that at winsock level it uses sendto/recvfrom.
For what version it uses, I think it calls WSAStartup(0x101) if that is what you mean.. You could just verify it by looking at it in debugger though. It also uses mostly the Berkeley sockets functions.

And most of (all?) the winsock functions are hidden behind the storm SNet api, which may be documented somewhere.

Some info about the storm packet format is here: https://bnetdocs.org/?op=doc&did=34
Also at end of this page: https://code.google.com/p/vgce/wiki/starcraftCommands#Packet_Header



None.

Aug 14 2015, 9:35 am iCCup.xboi209 Post #3



What about the functions like WSASendTo/WSARecvFrom? Does SC use a combination of wsock32.dll and ws2_32.dll?



None.

Aug 14 2015, 1:11 pm Neiv Post #4



These are the only winsock functions use by standard.snp
Code
wsock32:
#2 bind
#3 closesocket
#9 htons
#17 recvfrom
#20 sendto
#21 setsockopt
#23 socket
#111 WSAGetLastError
#115 WSAStartup
#116 WSACleanup

wsa2_32:
WSAIoctl


At least on my pc though, wsock32 functions just redirect to ws32_32.
Battle.snp uses other functions as well, as it needs to communicate with the chat server, and it is not required to share any of its code with standard.snp, but ingame communication should be the same.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:40 am]
Oh_Man -- tthen u come to SCBW and it's like - upload WAV, play WAV.... sigh why cant it be that easy
[01:40 am]
Oh_Man -- and no consistent easy to use way to then play the audio either
[01:39 am]
Oh_Man -- where they use third party audioprogram called WWISE which basically makes adding audio extremely difficult
[01:39 am]
Oh_Man -- i appreciate SCBW's ability to just let us upload and play WAVs so much compared to nightmare that is total war warhammer 3
[2026-7-18. : 2:27 am]
Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
[2026-7-17. : 2:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[2026-7-17. : 2:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[2026-7-16. : 6:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[2026-7-16. : 6:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[2026-7-16. : 6:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
Please log in to shout.


Members Online: O)FaRTy1billion[MM], Symmetry, Ultraviolet