Sponsored Content
Special Forums IP Networking Problems and doubts with sockets and timeouts Post 302966190 by Kovalevski on Tuesday 9th of February 2016 08:14:36 AM
Old 02-09-2016
Problems and doubts with sockets and timeouts

Hi! I need some help to understand a little bit more the behaviour about socket and TCP connections...
Here is my problem I have a client and a server that were written in python. The server program wait
until a message arrive and then print the message but if the message not arrive in a second (a timeout of a second)
the connection is reset. In the other side the client sends a message in a random time and a "Still alive" message in about 0.4 seconds to the server.

For unexplained reasons randomly a timeout happen in the server Smilie although that I send the message just in time ,
I don't understand why this happen. I tried deactivate the Nagle's algorithm but the only change that I saw was the
time in appear another time out (in fact more larger) . I thought that if I can't avoid that problem about time outs
I must send the message again if the message was not received, but this produce me a few questions

Where are the messages that were lost in time out?
Can I have repeated messages after the time out? I mean If the timeout occurs, the message I sent can arrive later?
Why timeouts occur if I send correctly and timely message?

Thanks!
 

9 More Discussions You Might Find Interesting

1. Cybersecurity

UNIX Network timeouts

Hi, can anyone point me in the right direction regarding a UNIX setting that determines when a network connection will timeout? I am getting network timeouts and I would like to know if there is a setting in UNIX 11i OS that I can modify to increase the time limit. Thank you (4 Replies)
Discussion started by: Allano
4 Replies

2. UNIX for Dummies Questions & Answers

Device Timeouts on Unix Server

Hi I am brand new to the forum I have very limited understanding of unix, but am very computer literate. At work we have a unix server which has been the bane of our lives. We have stopped being able to access the network drives and the screen has lots of device timeouts. I have learned how to do... (1 Reply)
Discussion started by: scovell01
1 Replies

3. UNIX for Advanced & Expert Users

Facing file processing timeouts

Hi In our ETL application we have used simple scripts to move & split the files. We are randomly facing timeouts on these jobs. It indicates we are running out of resources. How should I confirm the resources are inadequate? I know we have commands like vmstat & iostat which displays... (3 Replies)
Discussion started by: videsh77
3 Replies

4. UNIX for Dummies Questions & Answers

Unix doubts

Hello All, I am very new to UNIX. Please help me to find answers of below questions. 1.A script is saved with name ls. When we execute the script what it will execute? a) Will execute ls command b) Will execute the script c) Will execute script or command depends on the path ... (2 Replies)
Discussion started by: aswathy
2 Replies

5. Shell Programming and Scripting

doubts in crontab

Hi All, I am tring to set a shedule for cron to execute my script in every 15 min, n want a mail alert on my mail id if cron fails to get data as input for my script, how can i set that? Thanks in advance Subin (1 Reply)
Discussion started by: subin_bala
1 Replies

6. UNIX for Dummies Questions & Answers

Doubts on FIFO

Hi , I m beginner for Unix and i want to use FIFO in my 2 Scripts . I want 1 script to read data from FIFO and other will write into FIFO. Despite reading so many articles/posts i am still unable sunchronize my scripts. My doubts are 1> Do We require both scripts as daemons to use... (0 Replies)
Discussion started by: Akshay
0 Replies

7. UNIX for Dummies Questions & Answers

Unix doubts

Hi All, 1. how and who calls .profile when you login 2. what is PPID and what means by PPID = 0 Thanks in Advance (2 Replies)
Discussion started by: ravi.sadani19
2 Replies

8. Programming

Machine dependent problems when using Sockets.

I am trying to write code for a client-server scenario using AF_INET sockets.. As is usually the case, everything works fine and dandy on my machine, but gives me the following error at runtime: send: Socket operation on non-socket The error is thrown by the server when trying to send the... (5 Replies)
Discussion started by: ab_tall
5 Replies

9. Shell Programming and Scripting

Timeouts in expect script

Hi all. I have an expect script which for walks across servers, checks freespace and provides sorted list of biggest files #!/usr/bin/expect -- set timeout 600 stty -echo log_user 0 spawn -noecho sudo -u introot /home/introot/bin/twssh expect root send_user "Entering \r" send "uname\r"... (15 Replies)
Discussion started by: urello
15 Replies
xpainfo(3)							SAORD Documentation							xpainfo(3)

NAME
XPAInfo - send short message to one or more XPA servers SYNOPSIS
#include <xpa.h> int XPAInfo(XPA xpa, char *template, char *paramlist, char *mode, char **names, char **messages, int n); DESCRIPTION
Send a short paramlist message to one or more XPA servers whose class:name identifier matches the specified template. A template of the form "class1:name1" is sent to the XPA name server, which returns a list of at most n matching XPA servers. A connection is established with each of these servers and the paramlist string is passed to the server as the data transfer request is initiated. If an XPA struct is passed to the call, then the persistent connections are updated as described above. Otherwise, temporary connections are made to the servers (which will be closed when the call completes). The XPAInfo() routine does not send data from a buf to the XPA servers. Only the paramlist is sent. The semantics of the paramlist is not formalized, but at a minimum is should tell the server how to get more information. For example, it might contain the class:name of the XPA access point from which the server (acting as a client) can obtain more info using XPAGet. A string containing the class:name and ip:port of each server is returned in the name array. If a given server returned an error or the server callback sends a message back to the client, then the message will be stored in the associated element of the messages array. The returned message string will be of the form: XPA$ERROR error-message (class:name ip:port) or XPA$MESSAGE message (class:name ip:port) The return value will contain the actual number of servers that were processed. This value thus will hold the number of valid entries in the names and messages arrays, and can be used to loop through these arrays. In names and/or messages is NULL, no information is passed back in that array. The following keywords are recognized: key value default explanation ------ -------- -------- ----------- ack true/false true if false, don't wait for ack from server When ack is false, XPAInfo() will not wait for an error return from the XPA server. This means, in effect, that XPAInfo will send its paramlist string to the XPA server and then exit: no information will be sent from the server to the client. This UDP-like behavior is essential to avoid race conditions in cases where XPA servers are sending info messages to other servers. If two servers try to send each other an info message at the same time and then wait for an ack, a race condition will result and one or both will time out. Example - (void)XPAInfo(NULL, "IMAGE", "ds9 image", NULL, NULL, NULL, 0); SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xpainfo(3)
All times are GMT -4. The time now is 08:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy