recvfrom
Re: recvfrom
problem solved:
there's ioctl function... I didn't know about the function until I read socket.h and compare the function from other resources... use
there's ioctl function... I didn't know about the function until I read socket.h and compare the function from other resources... use
Code: Select all
#include <sys/types.h>
#include <sys/socket.h>
// no need to use this, because it's included in socket.h #include <sys/ioctl.h>
⋮
int dontblock;
int rc;
int server_sock
⋮
/* Place the socket into nonblocking mode */
dontblock = 1;
rc = ioctl(server_sock, FIONBIO, (char *) &dontblock);
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests