Public feed #893235

Mine

public text v1 · immutable
Raw Edit
·published 2008-02-05 23:54 UTC
rendered paste body
	if (!Initialized)
		return false;

	timeval wait;
	wait.tv_sec = 0;
	wait.tv_usec = 1;

	fd_set recvs;
	FD_ZERO(&recvs);
	FD_SET(mySocket, &recvs);

	// int select(int nfds, fd_set* readfds, fd_set* writefds, fd_set* exceptfds, const struct timeval* timeout);
	int status = select(mySocket+1, &recvs, NULL, NULL, &wait);

	return FD_ISSET(mySocket,&recvs) ? 1 : 0;