linux - Receiving multiple datagrams in a single system call -
on linux, unless i'm mistaken, application can use socket call family send or receive 1 packet @ time on datagram transports.
would know if linux provides means application send , receive multiple packets in single call on datagram transports.
use recvmmsg receive multiple datagram packets (example udp)
int recvmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int flags, struct timespec *timeout); description recvmmsg() system call extension of recvmsg(2) allows caller receive multiple messages socket using single system call. ...
http://man7.org/linux/man-pages/man2/recvmmsg.2.html
use sendmmsg send...
int sendmmsg(int sockfd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int flags); description sendmmsg() system call extension of sendmsg(2) allows caller transmit multiple messages on socket using single system call.
Comments
Post a Comment