@@ -134,6 +134,19 @@ ssize_t anssock_send(int sockfd, const void *buf, size_t len, int flags);
134134 */
135135ssize_t anssock_write (int fd , const void * buf , size_t count );
136136
137+ /**
138+ * Writes iovcnt buffers of data described by iov to the file associated with the file descriptor fd ("gather output").
139+ * Write user data via socket. This is nonblocking function, so shall check EAGAIN.
140+ *
141+ * @param
142+ * @param
143+ *
144+ * @return
145+ * On success, these calls return the number of characters sent. On error, -1 is returned, and errno is set appropriately.
146+ * If errno is EAGAIN, no buffer for sending data.
147+ */
148+ ssize_t anssock_writev (int fd , const struct iovec * iov , int iovcnt );
149+
137150/**
138151 * Receive user data from socket. This function is designed as nonblocking function, so shall not set socket as nonblocking and work with epoll.
139152 *
@@ -173,6 +186,19 @@ ssize_t anssock_recv(int sockfd, void *buf, size_t len, int flags);
173186 */
174187ssize_t anssock_read (int fd , void * buf , size_t count );
175188
189+
190+ /**
191+ * Reads iovcnt buffers from the file associated with the file descriptor fd into the buffers described by iov ("scatter input").
192+ *
193+ * @param
194+ * @param
195+ *
196+ * @return
197+ * These calls return the number of bytes received, or -1 if an error occurred. In the event of an error, errno is set to indicate the error.
198+ * If errno is EAGAIN, no data are present to be received.
199+ */
200+ ssize_t anssock_readv (int fd , const struct iovec * iov , int iovcnt );
201+
176202/**
177203 * Listen for connections on a socket
178204 *
0 commit comments