Sponsored Content
Top Forums Programming when socket know the peer machin has already been down? Post 302344262 by Corona688 on Saturday 15th of August 2009 12:33:31 PM
Old 08-15-2009
To reiterate, TCP takes a while to detect and close broken connections because that is what it is designed to do, because it's a stream socket with best-effort delivery. If you don't want that behavior, don't use a stream socket with best-effort delivery. UDP would be more appropriate. You could also use ICMP -- that is, ping.

Last edited by Corona688; 08-15-2009 at 01:39 PM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to get the list of process running in the server from the local machin n unix ?

how to get the list of process running in the server from the local machin n unix ? (3 Replies)
Discussion started by: guhas
3 Replies

2. UNIX for Advanced & Expert Users

connect problem for sctp socket (ipv6 socket) - Runtime fail Invalid Arguments

Hi, I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime. To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies

3. Solaris

peer-to-peer connection on solaris and windows

hi everyone. As a solaris/unix beginner, I am trying a peer-to-peer connection with my Sun and Windows. Here is my setup: -Windows XP -Sun System (Netra T1) which is connected to the console of the WinXP machine. -Windows XP has wireless connection which enables me to access internet ... (3 Replies)
Discussion started by: graboid888
3 Replies

4. IP Networking

Firewall stopping Peer to Peer File sharing

I am looking for advice on a router. I am new to Linux and am trying to use Limewire and Ktorent and can make no connection. Limewire indicates I have a firewall. I have a Linksys router WRK54G and my guess is that is the problem. I have spent hours upon hours trying to get it to work using info... (0 Replies)
Discussion started by: Paul K
0 Replies

5. UNIX for Dummies Questions & Answers

fatal: Read from socket failed: Connection reset by peer

I get this error when I log in through console: "fatal: Read from socket failed: Connection reset by peer". Can you tell me what this is and why it happens, and how to stop it? Thank you. (1 Reply)
Discussion started by: iamnew2solaris
1 Replies

6. IP Networking

Clarification - Setting socket options at the same time when socket is listening

I need clarification on whether it is okay to set socket options on a listening socket simultaneously when it is being used in an accept() call? Following is the scenario:- -- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies

7. IP Networking

Problem with Static route through peer to peer connection

Hi, I am trying to add a static route in one of 3 server (S3) so that I can access the main application server (S1). But problem is, the server (S3) where I am trying to add static route is connected with another server (S2) which is in same private network of application server (S1). I have... (9 Replies)
Discussion started by: ImranBD
9 Replies

8. UNIX for Advanced & Expert Users

Fatal: Read from socket failed: Connection reset by peer [preauth]

Hello, I have recently updated my AIX machine from version 6.1.7.5 to 6.1.9.1 and i noticed that the errpt of the server is full of ssh messages like the one below: sshdprocess_id>]: fatal: Read from socket failed: Connection reset by peer Does anyone knows if this a known bug of the ssh... (15 Replies)
Discussion started by: omonoiatis9
15 Replies

9. AIX

Add AIX machin to my windows network

Hi, Can you explain me step by step how can add my aix 6.1 to windows network. Thans:rolleyes: (5 Replies)
Discussion started by: tatab355
5 Replies
socket(7)						 Miscellaneous Information Manual						 socket(7)

NAME
socket - interprocess communications DESCRIPTION
Sockets are communication endpoints that allow processes to communicate either locally or remotely. They are accessed by means of a set of system calls (see socket(2)). The following requests are defined in (see ioctl(2)): If the int with the address arg is non-zero, the socket is put into non-blocking mode. Otherwise, the socket is put into blocking mode. Blocking mode is the default. The request is equivalent to the request, although using is not recommended. See accept(2), connect(2), recv(2), and send(2) for an explanation of how non-blocking mode is used. For SOCK_STREAM sockets, the number of bytes currently readable from this socket is returned in the integer with the address arg. For SOCK_DGRAM sockets, the number of bytes currently readable, plus the size of the sockaddr structure (defined in is returned in the integer with the address arg. For SOCK_STREAM TCP sockets, on return the integer with the address arg is non-zero if the inbound TCP stream has been read up to where the out-of-band data byte starts. Otherwise, the inbound TCP stream has not yet been read up to where the out-of- band data byte starts. For sockets other than SOCK_STREAM TCP sockets, on return the integer with the address arg is always zero. This request sets the process group or process ID associated with the socket to be the value of the integer with the address arg. A process group or process ID associated with the socket in this manner is signaled when the state of the socket changes: is delivered upon the receipt of out-of- band data; is delivered if the socket is asynchronous, as described in below. If the value of the integer with the address arg is positive, the signal is sent to the process whose process ID matches the value specified. If the value is negative, the signal is sent to all the processes that have a process group equal to the absolute value of the value specified. If the value is zero, no signal is sent to any process. It is necessary to issue this request with a non-zero integer value to enable the signal delivery mechanism described above. The default for the process group or process ID value is zero. This request returns the process group or process ID associated with the socket in the integer with the address arg. See the explanation for above for more details on the meaning of the integer value returned. If the integer whose address is arg is non-zero, this request sets the state of the socket as asynchronous. Otherwise, the socket is put into synchronous mode (the default). Asynchronous mode enables the delivery of the signal when either of the following conditions is met. o New data arrives. o For connection-oriented protocols, whenever additional outgoing buffer space becomes available or the connection is established or broken. The process group or process ID associated with the socket must be non-zero in order for signals to be sent. The signal is delivered according to the semantics of described above. The fcntl(2) and flags (defined in are supported by sockets. If the flag is set, the socket is put into POSIX-style non-blocking mode. If the flag is set, the socket is put into non-blocking mode. Otherwise, the socket is put into blocking mode. Blocking mode is the default. See accept(2), connect(2), recv(2), and send(2) for an explanation of how these forms of non-blocking mode are used. Since the and flags and requests are supported, the following clarifies on how these features interact. If the or flag has been set, and requests behave accordingly, regardless of any requests. If neither the flag nor the flag has been set, requests control the the behavior of and DEPENDENCIES
AF_CCITT Only Only the and requests are defined for sockets. AUTHOR
was developed by the University of California, Berkeley. SEE ALSO
fcntl(2), getsockopt(2), ioctl(2), socket(2). socket(7)
All times are GMT -4. The time now is 12:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy