#include "rldefine.h"
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#include <io.h>
#include <direct.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "rlsocket.h"
#include "rlwthread.h"
#include "rlcutil.h"
Go to the source code of this file.
|
void WSAAPI | freeaddrinfo (struct addrinfo *) |
|
int WSAAPI | getaddrinfo (const char *, const char *, const struct addrinfo *, struct addrinfo **) |
|
int WSAAPI | getnameinfo (const struct sockaddr *, socklen_t, char *, DWORD, char *, DWORD, int) |
|
int | rlwsa () |
|
int | rlScoketWrite (int *socket, const void *buf, int len) |
|
◆ MSG_NOSIGNAL [1/2]
◆ MSG_NOSIGNAL [2/2]
◆ WTREAD_GNUC5
#define WTREAD_GNUC5 ( __GNUC__ * 1000 ) + __GNUC_MINOR__ |
◆ freeaddrinfo()
void WSAAPI freeaddrinfo |
( |
struct addrinfo * |
| ) |
|
◆ getaddrinfo()
int WSAAPI getaddrinfo |
( |
const char * |
, |
|
|
const char * |
, |
|
|
const struct addrinfo * |
, |
|
|
struct addrinfo ** |
|
|
) |
| |
◆ getnameinfo()
int WSAAPI getnameinfo |
( |
const struct sockaddr * |
, |
|
|
socklen_t |
, |
|
|
char * |
, |
|
|
DWORD |
, |
|
|
char * |
, |
|
|
DWORD |
, |
|
|
int |
|
|
) |
| |
◆ 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);