Today 4.13

xiaoxiao2021-03-05  24

"THE C Programming Language 2nd" completed reading

Chapter 13: Advanced I / O Functions in the . Re-uses the related functions.

Write some package functions:

INT Socket (int Domain, int type, int protocol);

INT Connect (int sockfd, struct sockaddr * serv_addr, socklen_t addrlen);

SSIZE_T READ (INT FD, VOID * BUF, SIZE_T COUNT);

SSIZE_T WRITE (INT FD, VOID * BUF, SIZE_T Count);

INT OPEN (const char * filename, int flags, mode_t mode);

Struct Hostent * gethostByName (const char * name);

INT BIND (int suckfd, struct sockaddr * my_addr, socklen_t addrlen);

SSIZE_T RECVMSG (int S, Struct Msghdr * MSG, INT FLAGS);

SSIZE_T Sendmsg (int S, Const struct msghdr * msg, int flags);

转载请注明原文地址:https://www.9cbs.com/read-35972.html

New Post(0)