Winsock2ソケット関連API

WinSock2のソケット関連API一覧です。


SOCKET
accept(
    IN SOCKET s,
    OUT struct sockaddr FAR * addr,
    IN OUT int FAR * addrlen
    );

int
bind(
    IN SOCKET s,
    IN const struct sockaddr FAR * name,
    IN int namelen
    );

int
closesocket(
    IN SOCKET s
    );

int
connect(
    IN SOCKET s,
    IN const struct sockaddr FAR * name,
    IN int namelen
    );

int
ioctlsocket(
    IN SOCKET s,
    IN long cmd,
    IN OUT u_long FAR * argp
    );

int
getpeername(
    IN SOCKET s,
    OUT struct sockaddr FAR * name,
    IN OUT int FAR * namelen
    );

int
getsockname(
    IN SOCKET s,
    OUT struct sockaddr FAR * name,
    IN OUT int FAR * namelen
    );

int
getsockopt(
    IN SOCKET s,
    IN int level,
    IN int optname,
    OUT char FAR * optval,
    IN OUT int FAR * optlen
    );

u_long
htonl(
    IN u_long hostlong
    );

u_short
htons(
    IN u_short hostshort
    );

unsigned long
inet_addr(
    IN const char FAR * cp
    );

char FAR *
inet_ntoa(
    IN struct in_addr in
    );

int
listen(
    IN SOCKET s,
    IN int backlog
    );

u_long
ntohl(
    IN u_long netlong
    );

u_short
ntohs(
    IN u_short netshort
    );

int
recv(
    IN SOCKET s,
    OUT char FAR * buf,
    IN int len,
    IN int flags
    );

int
recvfrom(
    IN SOCKET s,
    OUT char FAR * buf,
    IN int len,
    IN int flags,
    OUT struct sockaddr FAR * from,
    IN OUT int FAR * fromlen
    );

int
select(
    IN int nfds,
    IN OUT fd_set FAR * readfds,
    IN OUT fd_set FAR * writefds,
    IN OUT fd_set FAR *exceptfds,
    IN const struct timeval FAR * timeout
    );

int
send(
    IN SOCKET s,
    IN const char FAR * buf,
    IN int len,
    IN int flags
    );

int
sendto(
    IN SOCKET s,
    IN const char FAR * buf,
    IN int len,
    IN int flags,
    IN const struct sockaddr FAR * to,
    IN int tolen
    );

int
setsockopt(
    IN SOCKET s,
    IN int level,
    IN int optname,
    IN const char FAR * optval,
    IN int optlen
    );

int
shutdown(
    IN SOCKET s,
    IN int how
    );

SOCKET
socket(
    IN int af,
    IN int type,
    IN int protocol
    );


プロフェッショナルIPv6解説動画シリーズ再生リスト

動画で学ぶ「プロフェッショナルIPv6」を作っています。 もしよろしければご覧ください。お楽しみいただければ幸いです!