Re: TCP connection

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

 



Hi,

Sorry, this is really not a linux question, rather a network programming question if you could still help me out:

1. I have a server / client program of tcp connection on linux. The server uses a select function to wait clients packets. It works fine until a client program is terminated. Then the server is crashed (server program can no longer be blocked at select). How can the server detects the client terminate without crashing?

2. Is there any system function call or utilities on linux to check Ethernet and network status?

3. Why we need to cast struct sockaddr_in serverAddress, clientAddress to struct sockaddr *) in bind(fd, (struct sockaddr *)&serverAddress, sizeof(serverAddress)) and accept(fd, (struct sockaddr *)&clientAddress, &clientLength)?

Thank you for your time and patience.

Jim
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
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