| Summary: | Outgoing data with stream sockets on FreeBSD | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | ypoeluev <ypoeluev> | ||||
| Component: | i386 | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
ypoeluev
1999-08-04 16:40:01 UTC
This was fixed in src/sys/kern/uipc_socket.c v1.41 .. your best bet is to either hand patch the kernel and see if it works, or just upgrade to a later release. This PR can be closed. Someone? Adrian Hi Adrian, Thanks for your reply. I have found a solution. Apparently, stream sockets do not guarantee that a packet at the application level will be delivered in one piece. It was wrong for me to say that I was losing data, that wasn't the case. The application-sender was sending a packet of 150 bytes, for instance, first time the application-receiver got 100 bytes and second time it got the rest 50 bytes. Anyway, my impression of stream sockets was that if an application sends a packet, an application-receiver would get the same packet or bigger one if more data is available from UDP. I guess, I was wrong to assume that stream sockets will not break the packets at the application level. But, it's still interesting that only on FreeBSD stream sockets break packets (101-207-byte long) into two. In my case, I'd rather use packet oriented sockets (datagram), that guarantees packets delivery with possible loss of packets though. Some people were saying that you can send a delimiter (CR) to separate packets inside the data stream, but if an application sends binary data this is not a good choice of course. It seems that an application cannot have reliable and packet oriented protocol at the same time. Sorry for taking your time. Please, close this PR. Thanks, Yuri Poeluev Certicom Corp. State Changed From-To: open->closed Submitter reports this can be closed. |