#include
int socket(int domain, int type, int protocol);
int bind(int sockfd, const struct sockaddr *my_addr, int addrlen);
int connect(int sockfd, const struct sockaddr *addr, int addrlen);
int accept(int sockfd, struct sockaddr *addr, int addrlen);
int lisetn(int sockfd, int backlog);
int send(int sockfd, const char *buf, int len, int flags);
int recv(int sockfd, char *buf, int len, int flags);
int select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout);
BOOL closesocket(int sockfd);
UDP:
CLIENT SERVER
socket() socket()
bind() bind()
recv()/send() send()/recv()
closesocket() closesocket()
TCP:
CLIENT SERVER
socket()
bind()
listen()
accept()
socket()
connect()
send()/recv()
send()/recv()
closesocket()
closesocket()
阅读(1150) | 评论(0) | 转发(0) |