Sponsored Content
Top Forums Shell Programming and Scripting Continuous nc data acquisition fails ocassionally Post 303019911 by lanas1234 on Tuesday 10th of July 2018 04:10:22 AM
Old 07-10-2018
Thanks a lot to Corona and everybody!

Corona I think your solution should work but the problem is that the sender is under a DHCP so the IP would change during time if a disconnection occurs for example.

I finally reach to this solution using ncat, but I think is portable to nc:

Code:
while true do
ncat -lu -p 56045 --recv-only -i 60s | ...
end

With this if a disconnection occurs or data sender stops, ncat will start a new connection and everything will continue.

All the best!
 

5 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Need info regarding CDP - continuous data protection

HI frnds, i am going to work on CDP(continuous data protection),does any one of them have any idea reg CDP ... any docs or Links...might be helpful to me in understanding it.... (1 Reply)
Discussion started by: deep
1 Replies

2. Shell Programming and Scripting

Continuous checking of a file

I have a requirement like this... I want to go to a particular server for which i have acess .I want to do a ssh to that server from one server and check if a file is theer or not..and i need the script to chcek continuosly till it finds the file.When it finds the file i want it to come out... (9 Replies)
Discussion started by: kanta_bhakti
9 Replies

3. UNIX for Dummies Questions & Answers

Extracting data between continuous non empty xml tags

Hi, I need help in extracting only the phone numbers between the continuous non empty xml tags in unix. I searched through a lot of forum but i did not get exact result for my query. Please help Given below is the sample pipe delimited file. I have a lot of tags before and after... (6 Replies)
Discussion started by: zen01234
6 Replies

4. Shell Programming and Scripting

Continuous Copying from a directory to another.

Hello Folks, Looking for a script, where i can check for the existing of the files in a directory and copying to another. How can i achieve it in loop for over period of time. whatever files comes into the folder copied in another without duplicate and should be continuous loop. ... (8 Replies)
Discussion started by: sadique.manzar
8 Replies

5. UNIX for Beginners Questions & Answers

Continuous for loop

Hi All, Please help ***************** a=100 and run for loop that will minus 30 from 100 an will display value run loop will run till display value will be 0 ***************** Thanking you (1 Reply)
Discussion started by: Praful Pednekar
1 Replies
t_rcvdis(3NSL)					       Networking Services Library Functions					    t_rcvdis(3NSL)

NAME
t_rcvdis - retrieve information from disconnection SYNOPSIS
#include <xti.h> int t_rcvdis(int fd, struct t_discon *discon); DESCRIPTION
This routine is part of the XTI interfaces which evolved from the TLI interfaces. XTI represents the future evolution of these interfaces. However, TLI interfaces are supported for compatibility. When using a TLI routine that has the same name as an XTI routine, the tiuser.h header file must be used. Refer to the TLI COMPATIBILITY section for a description of differences between the two interfaces. This function is used to identify the cause of a disconnection and to retrieve any user data sent with the disconnection. The argument fd identifies the local transport endpoint where the connection existed, and discon points to a t_discon structure containing the following members: struct netbuf udata; int reason; int sequence; The field reason specifies the reason for the disconnection through a protocol-dependent reason code, udata identifies any user data that was sent with the disconnection, and sequence may identify an outstanding connection indication with which the disconnection is associated. The field sequence is only meaningful when t_rcvdis() is issued by a passive transport user who has executed one or more t_listen(3NSL) functions and is processing the resulting connection indications. If a disconnection indication occurs, sequence can be used to identify which of the outstanding connection indications is associated with the disconnection. The maxlen field of udata may be set to zero, if the user does not care about incoming data. If, in addition, the user does not need to know the value of reason or sequence, discon may be set to NULL and any user data associated with the disconnection indication shall be discarded. However, if a user has retrieved more than one outstanding connection indication by means of t_listen(3NSL), and discon is a null pointer, the user will be unable to identify with which connection indication the disconnection is associated. RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and t_errno is set to indicate an error. VALID STATES
T_DATAXFER, T_OUTCON, T_OUTREL, T_INREL, T_INCON(ocnt > 0). ERRORS
On failure, t_errno is set to one of the following: TBADF The specified file descriptor does not refer to a transport endpoint. TBUFOVFLW The number of bytes allocated for incoming data (maxlen) is greater than 0 but not sufficient to store the data. If fd is a passive endpoint with ocnt > 1, it remains in state T_INCON; otherwise, the endpoint state is set to T_IDLE. TNODIS No disconnection indication currently exists on the specified transport endpoint. TNOTSUPPORT This function is not supported by the underlying transport provider. TOUTSTATE The communications endpoint referenced by fd is not in one of the states in which a call to this function is valid. TPROTO This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no other suitable XTI error (t_errno). TSYSERR A system error has occurred during execution of this function. TLI COMPATIBILITY
The XTI and TLI interface definitions have common names but use different header files. This, and other semantic differences between the two interfaces are described in the subsections below. Interface Header The XTI interfaces use the header file, xti.h. TLI interfaces should not use this header. They should use the header: #include <tiuser.h> Error Description Values The t_errno values TPROTO and TOUTSTATE can be set by the XTI interface but not by the TLI interface. A failure return, and a t_errno value that this routine can set under different circumstances than its XTI counterpart is TBUFOVFLW. It can be returned even when the maxlen field of the corresponding buffer has been set to zero. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
t_alloc(3NSL), t_connect(3NSL), t_listen(3NSL), t_open(3NSL), t_snddis(3NSL), attributes(5) SunOS 5.10 7 May 1998 t_rcvdis(3NSL)
All times are GMT -4. The time now is 03:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy