I would like to know: when programming in C using a socket (AF_UNIX) is there any limit (in bytes) when sending or receiving to or from a socket?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can change the read and write buffers for each individual socket connection using
setsockopt(SO_SNDBUFandSO_RCVBUF).The default and maximum sizes are platform dependent.
Furthermore, if you provide a larger user-side buffer for each individual read e.g. with
recv.And if you use several
recvs in sequence, you can read an infinite amount of bytes over a connection, it’ll just take infinitely long.