12 #include "../../stdafx.h" 13 #include "../../debug.h" 17 #include "../../safeguards.h" 30 DEBUG(net, 3,
"[core] loading windows socket library");
31 if (WSAStartup(MAKEWORD(2, 0), &wsa) != 0) {
32 DEBUG(net, 0,
"[core] WSAStartup failed, network unavailable");
61 for (j = 0; j <
sizeof(grf->
md5sum); j++) {
75 for (j = 0; j <
sizeof(grf->
md5sum); j++) {
Internal entity of a packet.
Network stuff has many things that needs to be included and/or implemented by default.
uint32 Recv_uint32()
Read a 32 bits integer from the packet.
bool NetworkCoreInitialize()
Initializes the network core (as that is needed for some platforms.
void Send_uint8(uint8 data)
Package a 8 bits integer in the packet.
void Send_uint32(uint32 data)
Package a 32 bits integer in the packet.
Basic data to distinguish a GRF.
void NetworkCoreShutdown()
Shuts down the network core (as that is needed for some platforms.
#define DEBUG(name, level,...)
Output a line of debugging information.
uint8 Recv_uint8()
Read a 8 bits integer from the packet.
Basic functions to create, fill and read packets.
uint32 grfid
GRF ID (defined by Action 0x08)
void ReceiveGRFIdentifier(Packet *p, GRFIdentifier *grf)
Deserializes the GRFIdentifier (GRF ID and MD5 checksum) from the packet.
uint8 md5sum[16]
MD5 checksum of file to distinguish files with the same GRF ID (eg. newer version of GRF) ...
void SendGRFIdentifier(Packet *p, const GRFIdentifier *grf)
Serializes the GRFIdentifier (GRF ID and MD5 checksum) to the packet.