59#define NYEARS (unsigned long)(1970 - 1900)
60#define TOFFSET (unsigned long)(60*60*24*(365*NYEARS + (NYEARS/4)))
77 unsigned long thetime;
102 res =
sendto(
s, (
char *)&thetime,
sizeof(thetime), 0,
103 (
struct sockaddr *)addrp,
sizeof(*addrp));
121 fromlen =
sizeof(
from);
133 res =
recv(
s, (
char *)&thetime,
sizeof(thetime), 0);
139 if (
res !=
sizeof(thetime)) {
143 thetime =
ntohl(thetime);
INT WSAAPI recvfrom(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags, OUT LPSOCKADDR from, IN OUT INT FAR *fromlen)
INT WSAAPI recv(IN SOCKET s, OUT CHAR FAR *buf, IN INT len, IN INT flags)
INT WSAAPI select(IN INT s, IN OUT LPFD_SET readfds, IN OUT LPFD_SET writefds, IN OUT LPFD_SET exceptfds, IN CONST struct timeval *timeout)
INT WSAAPI sendto(IN SOCKET s, IN CONST CHAR FAR *buf, IN INT len, IN INT flags, IN CONST struct sockaddr *to, IN INT tolen)
PSERVENT WSAAPI getservbyname(IN const char FAR *name, IN const char FAR *proto)
GLuint GLuint GLsizei GLenum type
int rtime(struct sockaddr_in *addrp, struct timeval *timep, struct timeval *timeout)
int _rpc_dtablesize(void)
static void do_close(SOCKET)
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
int PASCAL FAR WSAGetLastError(void)