From 24925a24ec012c6dda40f5e9ab6ab139ca1fde8b Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 27 Jun 2013 10:01:31 -0400 Subject: Cleaned up some stuff. --- core/network.c | 9 +++++++++ core/network.h | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/network.c b/core/network.c index 70536abf..81da3f1b 100644 --- a/core/network.c +++ b/core/network.c @@ -121,4 +121,13 @@ int init_networking(IP ip ,uint16_t port) bind(sock, (struct sockaddr*)&addr, sizeof(addr)); return 0; +} + +//function to cleanup networking stuff +void shutdown_networking() +{ + #ifdef WIN32 + WSACleanup(); + #endif + return; } \ No newline at end of file diff --git a/core/network.h b/core/network.h index a35ca214..24f7281d 100644 --- a/core/network.h +++ b/core/network.h @@ -96,4 +96,8 @@ int recievepacket(IP_Port * ip_port, char * data, uint32_t * length); //returns 0 if no problems //TODO: add something to check if there are errors int init_networking(IP ip ,uint16_t port); -#endif \ No newline at end of file + + +//function to cleanup networking stuff(doesn't do much right now) +void shutdown_networking(); +#endif -- cgit v1.2.3