diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/network.c | 9 | ||||
-rw-r--r-- | core/network.h | 6 |
2 files changed, 14 insertions, 1 deletions
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) | |||
121 | bind(sock, (struct sockaddr*)&addr, sizeof(addr)); | 121 | bind(sock, (struct sockaddr*)&addr, sizeof(addr)); |
122 | return 0; | 122 | return 0; |
123 | 123 | ||
124 | } | ||
125 | |||
126 | //function to cleanup networking stuff | ||
127 | void shutdown_networking() | ||
128 | { | ||
129 | #ifdef WIN32 | ||
130 | WSACleanup(); | ||
131 | #endif | ||
132 | return; | ||
124 | } \ No newline at end of file | 133 | } \ 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); | |||
96 | //returns 0 if no problems | 96 | //returns 0 if no problems |
97 | //TODO: add something to check if there are errors | 97 | //TODO: add something to check if there are errors |
98 | int init_networking(IP ip ,uint16_t port); | 98 | int init_networking(IP ip ,uint16_t port); |
99 | #endif \ No newline at end of file | 99 | |
100 | |||
101 | //function to cleanup networking stuff(doesn't do much right now) | ||
102 | void shutdown_networking(); | ||
103 | #endif | ||