diff options
Diffstat (limited to 'src/net/sdltcpnet.cpp')
-rw-r--r-- | src/net/sdltcpnet.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/net/sdltcpnet.cpp b/src/net/sdltcpnet.cpp index 97ed59443..7b0d2700f 100644 --- a/src/net/sdltcpnet.cpp +++ b/src/net/sdltcpnet.cpp @@ -64,12 +64,13 @@ void TcpNet::quit() SDLNet_Quit(); } -void TcpNet::closeSocket(TcpNet::Socket socket) +void TcpNet::closeSocket(const TcpNet::Socket socket) { SDLNet_TCP_Close(socket); } -int TcpNet::send(TcpNet::Socket sock, const void *const data, const int len) +int TcpNet::send(const TcpNet::Socket sock, const void *const data, + const int len) { return SDLNet_TCP_Send(sock, data, len); } @@ -79,7 +80,7 @@ char *TcpNet::getError() return SDLNet_GetError(); } -int TcpNet::resolveHost(IPaddress *const address, const char *host, +int TcpNet::resolveHost(IPaddress *const address, const char *const host, const Uint16 port) { return SDLNet_ResolveHost(address, host, port); @@ -87,7 +88,7 @@ int TcpNet::resolveHost(IPaddress *const address, const char *host, TcpNet::Socket TcpNet::open(IPaddress *const ip) { - TcpNet::Socket sock = SDLNet_TCP_Open(ip); + const TcpNet::Socket sock = SDLNet_TCP_Open(ip); if (sock && ip) { const TCPsocketHack *const hack @@ -125,7 +126,7 @@ TcpNet::SocketSet TcpNet::allocSocketSet(const int maxsockets) return SDLNet_AllocSocketSet(maxsockets); } -int TcpNet::addSocket(TcpNet::SocketSet set, TcpNet::Socket sock) +int TcpNet::addSocket(const TcpNet::SocketSet set, const TcpNet::Socket sock) { return SDLNet_TCP_AddSocket(set, sock); } @@ -135,12 +136,12 @@ int TcpNet::checkSockets(const TcpNet::SocketSet set, const Uint32 timeout) return SDLNet_CheckSockets(set, timeout); } -int TcpNet::recv(TcpNet::Socket sock, void *data, int maxlen) +int TcpNet::recv(const TcpNet::Socket sock, void *const data, const int maxlen) { return SDLNet_TCP_Recv(sock, data, maxlen); } -int TcpNet::delSocket(TcpNet::SocketSet set, TcpNet::Socket sock) +int TcpNet::delSocket(const TcpNet::SocketSet set, const TcpNet::Socket sock) { return SDLNet_TCP_DelSocket(set, sock); } |