Sponsored Content
Top Forums Programming when socket know the peer machin has already been down? Post 302344087 by Sedighzadeh on Friday 14th of August 2009 02:44:24 PM
Old 08-14-2009
when socket know the peer machin has already been down?

hi,

I have developed a very simple echo client/server application. I expect whenever i shutdown the server machine, the client peer detects the shutdown.In reality this doesn't happen and client continues to send and receive data.To my surprise, it even recv() returns with value greater than zero! I stops to recv() after a long period! ( about 5 minute later. )

Where is the problem? How can i detect the peer's shutdown?

Thanks in advance,
Behzad
 

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
SSL_set_shutdown(3)						      OpenSSL						       SSL_set_shutdown(3)

NAME
SSL_set_shutdown, SSL_get_shutdown - manipulate shutdown state of an SSL connection SYNOPSIS
#include <openssl/ssl.h> void SSL_set_shutdown(SSL *ssl, int mode); int SSL_get_shutdown(SSL *ssl); DESCRIPTION
SSL_set_shutdown() sets the shutdown state of ssl to mode. SSL_get_shutdown() returns the shutdown mode of ssl. NOTES
The shutdown state of an ssl connection is a bitmask of: 0 No shutdown setting, yet. SSL_SENT_SHUTDOWN A "close notify" shutdown alert was sent to the peer, the connection is being considered closed and the session is closed and correct. SSL_RECEIVED_SHUTDOWN A shutdown alert was received form the peer, either a normal "close notify" or a fatal error. SSL_SENT_SHUTDOWN and SSL_RECEIVED_SHUTDOWN can be set at the same time. The shutdown state of the connection is used to determine the state of the ssl session. If the session is still open, when SSL_clear(3) or SSL_free(3) is called, it is considered bad and removed according to RFC2246. The actual condition for a correctly closed session is SSL_SENT_SHUTDOWN (according to the TLS RFC, it is acceptable to only send the "close notify" alert but to not wait for the peer's answer, when the underlying connection is closed). SSL_set_shutdown() can be used to set this state without sending a close alert to the peer (see SSL_shutdown(3)). If a "close notify" was received, SSL_RECEIVED_SHUTDOWN will be set, for setting SSL_SENT_SHUTDOWN the application must however still call SSL_shutdown(3) or SSL_set_shutdown() itself. RETURN VALUES
SSL_set_shutdown() does not return diagnostic information. SSL_get_shutdown() returns the current setting. SEE ALSO
ssl(3), SSL_shutdown(3), SSL_CTX_set_quiet_shutdown(3), SSL_clear(3), SSL_free(3) 0.9.7a 2001-08-20 SSL_set_shutdown(3)
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy