I know what is happening hopefully you can help me now:
-Two times a day the receiver from where I'm getting the data stops sending for a couple of seconds due to an internal cron job.
What exactly does this cron job do -- kill the sender, then restart it? nc doesn't like that. Even in UDP mode, it's not connectionless - it knows who it's talking to, knows when it dies, and won't take a second connection.
Last edited by Corona688; 06-28-2018 at 03:39 PM..
GOT IT! If you want to send to nc more than once, you always have to do so from the same source port and IP. Otherwise nc will think you're a different sender and ignore it. And the source port is randomly chosen, unless you give the sender one with -p...
I have 192.168.0.126:19999 as the receiver here, and 192.168.0.150:20000 as the sender.
Receiving:
Sending:
Note that the sender is not quitting at end-of-line, it's quitting at end-of-file, so should still be able to handle a long, slow stream.
Last edited by Corona688; 06-28-2018 at 06:09 PM..
These 2 Users Gave Thanks to Corona688 For This Post:
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:
With this if a disconnection occurs or data sender stops, ncat will start a new connection and everything will continue.
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)
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)
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)
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)
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)