20 #ifndef __JackNetWinSocket__    21 #define __JackNetWinSocket__    23 #include "JackNetSocket.h"    33 #define E(code, s) { code, s }    34 #define NET_ERROR_CODE WSAGetLastError()    35 #define StrError PrintError    37     typedef uint32_t uint;
    39     typedef struct _win_net_error win_net_error_t;
    47     SERVER_EXPORT 
const char* PrintError(
int error);
    55             SOCKADDR_IN fSendAddr;
    56             SOCKADDR_IN fRecvAddr;
    68             int BindWith(
const char* ip);
    69             int BindWith(
int port);
    71             int ConnectTo(
const char* ip);
    77             void SetPort(
int port);
    81             int SetAddress(
const char* ip, 
int port);
    86             int GetName(
char* name);
    87             int JoinMCastGroup(
const char* mcast_ip);
    90             int SetOption(
int level, 
int optname, 
const void* optval, SOCKLEN optlen);
    91             int GetOption(
int level, 
int optname, 
void* optval, SOCKLEN* optlen);
    94             int SetTimeOut(
int usec);
    99             bool IsLocal(
char* ip);
   102             int SendTo(
const void* buffer, 
size_t nbytes, 
int flags);
   103             int SendTo(
const void* buffer, 
size_t nbytes, 
int flags, 
const char* ip);
   104             int Send(
const void* buffer, 
size_t nbytes, 
int flags);
   105             int RecvFrom(
void* buffer, 
size_t nbytes, 
int flags);
   106             int Recv(
void* buffer, 
size_t nbytes, 
int flags);
   107             int CatchHost(
void* buffer, 
size_t nbytes, 
int flags);
   110             net_error_t GetError();