Date: Tue, 23 Oct 2001 21:22:29 -0400 (EDT) From: Kenneth Wayne Culver <culverk@wam.umd.edu> To: freebsd-hackers@freebsd.org Subject: domain sockets question (don't laugh) Message-ID: <Pine.GSO.4.21.0110232114060.12407-100000@rac1.wam.umd.edu>
next in thread | raw e-mail | index | archive | help
While I've been coding for a long time, and am fairly decent at coding in the kernel, I've never really had a chance to get into sockets programming. So I thought I'd write a simple set of programs to see how things work. From what I understand, when you read on a socket, you have to do it in a loop because it won't block and wait for the total amount of data specified, while write will not return until all specified data has been written. My problem is that I've set up a read loop to read in chunks that are the size of the recv/send buffers (16384 bytes) from the socket (until the end of course, when it reads only what's left), then when I write from one program to the socket for the other program to read, the program that's writing exits with the message "broken pipe" while the program that's reading doesn't think there was any error, reads the amount of data it should have read (although I'm not sure if there's any data there). Can anyone tell me what's going on? Ken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0110232114060.12407-100000>