asd
public cpp v1 · immutableint SDLNet_TCP_Recv_2(TCPsocket sock, void *data, int maxlen){ int len; /* Server sockets are for accepting connections only */ if ( sock->sflag ) { SDLNet_SetError("Server sockets cannot receive"); return(-1); } errno = 0; do { len = recv(sock->channel, (char *) data, maxlen, 0); } while ( errno == EINTR ); sock->ready = 0; return(len);}