sockets: use new iovec interface

This commit is contained in:
Matheus
2024-09-21 10:53:49 -03:00
parent 3868b667cb
commit fb2fa68752
10 changed files with 89 additions and 87 deletions
+2 -2
View File
@@ -47,12 +47,12 @@ int iovec_iterator_copy_from_buffer(iovec_iterator_t *iovec_iterator, void *buff
// copies byte_count bytes from the iovec_iterator into the ringbuffer
// returns the number of bytes copied
// NOTE: the iovec can have userspace addresses. in this case, the copy can possibly fail by returning RINGBUFFER_USER_COPY_FAILED
size_t iovec_iterator_copy_to_ringbuffer(iovec_iterator_t *iovec_iterator, ringbuffer_t *ringbuffer, size_t byte_count);
size_t iovec_iterator_write_to_ringbuffer(iovec_iterator_t *iovec_iterator, ringbuffer_t *ringbuffer, size_t byte_count);
// copies byte_count bytes from the ringbuffer into the iovec_iterator
// returns the number of bytes copied
// NOTE: the iovec can have userspace addresses. in this case, the copy can possibly fail with RINGBUFFER_USER_COPY_FAILED
size_t iovec_iterator_copy_from_ringbuffer(iovec_iterator_t *iovec_iterator, ringbuffer_t *ringbuffer, size_t byte_count);
size_t iovec_iterator_read_from_ringbuffer(iovec_iterator_t *iovec_iterator, ringbuffer_t *ringbuffer, size_t byte_count);
// copies byte_count bytes from the ringbuffer into the iovec_iterator, without moving the ringbuffer read pointer
// returns the number of bytes copied