Mercurial > hg > nnchat
comparison libnnchat.c @ 64:6a3a917303e4
Some random cleanups, bring back WinSock support.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 11 Nov 2008 22:33:35 +0200 |
parents | ff5d74f0d428 |
children | e763ef5cfd53 |
comparison
equal
deleted
inserted
replaced
63:afd90bbb3af6 | 64:6a3a917303e4 |
---|---|
49 | 49 |
50 | 50 |
51 void closeConnection(const int sock) | 51 void closeConnection(const int sock) |
52 { | 52 { |
53 if (sock >= 0) { | 53 if (sock >= 0) { |
54 #ifdef __WIN32 | |
55 closesocket(sock); | |
56 #else | |
54 close(sock); | 57 close(sock); |
58 #endif | |
55 } | 59 } |
56 } | 60 } |
57 | 61 |
58 | 62 |
59 BOOL sendToSocket(const int sock, char *buf, const size_t bufLen) | 63 BOOL sendToSocket(const int sock, char *buf, const size_t bufLen) |