Re: tcp connection

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

 



On Fri, 25 Jun 2004, Martijn van Oosterhout wrote:

> Your program never gave any notice to the kernel that it was interested
> in the response from the other end. You just closed the socket and
> quit. The kernel needs the acks to guarentee the data reached the other
> end, but it doesn't need your program around to do it. If you want to
> wait till the other end exits, read the socket which will return when
> the far end has closed the connection.
> 
> Be careful of the situation where each end is waiting for the other.

See shutdown() for a solution to this.

Regards
Henrik

-
: 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