#include "rldefine.h"
#include "rlstring.h"
#include <winsock2.h>
#include <windows.h>
#include <io.h>
#include <direct.h>
Go to the source code of this file.
◆ wsa
you have to call this function before you use any sockets
(at least under windows)
Definition at line 39 of file rlsocket.h.
◆ rlScoketWrite()
int rlScoketWrite |
( |
int * |
socket, |
|
|
const void * |
buf, |
|
|
int |
len |
|
) |
| |
Definition at line 95 of file rlsocket.cpp.
97 int ret,bytes_left,first_byte;
100 if(socket == NULL)
return -1;
101 if(*socket == -1)
return -1;
106 while(bytes_left > 0)
108 ret = send(*socket,&cbuf[first_byte],bytes_left,
MSG_NOSIGNAL);
115 closesocket(*socket);
◆ rlwsa()
Definition at line 68 of file rlsocket.cpp.
72 WORD wVersionRequested;
79 wVersionRequested = MAKEWORD(1,1);
81 wVersionRequested = MAKEWORD(2,0);
83 err = WSAStartup(wVersionRequested, &wsadata);
86 ::printf(
"Startup error=%d on windows\n",err);