sending data on a socket followed by a close

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I am trying to send 500K on a asynchronous socket and after I've written all my data, I want to close the socket.

So I send data in a loop, and between calls to "write" I select on the filedescriptor till it is writable again and send more data.

I continue this untill I have no more data to send.

At the end, after sending all my data, I "close" the socket.

However, the client sees a TCP RST packet and only receives partial data.

What am I doing wrong?  I though that the close would actually kill the socket after all the data has been sent

Thanks
Lee
-- 
__________________________________________________________
Sign-up for your own personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux