diff options
author | irungentoo <irungentoo@gmail.com> | 2013-06-27 10:01:31 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-06-27 10:01:31 -0400 |
commit | 24925a24ec012c6dda40f5e9ab6ab139ca1fde8b (patch) | |
tree | 28e8b00864119736746ca42743aa35476cf3b83f /core | |
parent | d0ed1639144a5f3358d8bc69ad0885d0c1133877 (diff) |
Cleaned up some stuff.
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 | ||