08-23-2008
It would be easier if you post the code you're using.
Generally servers simply send a packet every X minutes and wait for reply for Y minutes, if there is no reply they assume the connection is timed out. You can use poll(), alarm(), setitimer()...
10 More Discussions You Might Find Interesting
1. AIX
We're having problems getting disconnected from AIX with our telnet sessions.
I can't ping the server when this happens, either. Other serves can be pinged at the same time.
This happens both at unix and within the database. Database locks remain when editing files. unix logins remain after... (0 Replies)
Discussion started by: e1lyons
0 Replies
2. AIX
I have intermec handheld device which is connecting to AIX Server on port 12431 or whatever. ( oracle application )
The handheld device connects for few seconds and then disconnects from the AIX server. Once it disconnects the handheld device automatically switches off.
Are there any... (2 Replies)
Discussion started by: filosophizer
2 Replies
3. Windows & DOS: Issues & Discussions
i am using Putty to do ssh to all the unix nodes that we have in our work environment. it is very strange that all my network connections will timeout quickly in 10 mins, it can either be a putty connection, sqlplus or toad. is there some setting that can help to prevent this. please let me know... (3 Replies)
Discussion started by: sudhiroracle
3 Replies
4. Programming
Hi,
I want to code TCP/IP client/server in linux application capable to fastly detect ethernet cable disconnection in any condition.
So I have activate SO_KEEPALIVE options and set TCP_KEEPCNT, TCP_KEEPIDLE and TCP_KEEPINTVL to 1.
When I disconnect ethernet cable I have the following... (5 Replies)
Discussion started by: jeje_clb
5 Replies
5. Programming
Hello,
I am able to establish a connection, and transfer data. Occasionally the receiving client will block in read(2) and stay that way until it is killed.
initial:
server: netstat -aveeopT
tcp 0 0 *:17398 *:* LISTEN server-user... (8 Replies)
Discussion started by: eoa
8 Replies
6. Programming
Hello!
I searched forum for similar topic, with no luck, if you know one, delete this topic, and send me private message with link please.
Little background:
I have a lot of clients and one serwer. Client can make multiple connections on different ports and ips, but only one can be acctive... (2 Replies)
Discussion started by: ikeban
2 Replies
7. Red Hat
Hi , My redhat 5 frequently disconnects from network. Once rebooted , network is working for one day or two. After that the NIC suddently stops working. Even if i give "#service network restart" or ifup eth0 commands it won't come up. I even tried reconfigure the network card. but no use. Only... (6 Replies)
Discussion started by: dknattukal
6 Replies
8. Solaris
I have problem with oracle solaris 10 running on oracle sparc T4-2 server.
Os information: 5.10 Generic_150400-03 sun4v sparc sun4v
Output from tcpstat.d script
TCP bytes: out outRetrans in inDup inUnorder
6833763 7300 98884 0... (2 Replies)
Discussion started by: insatiable1610
2 Replies
9. UNIX for Dummies Questions & Answers
Is there a way to have persistent terminal windows to redhat server across viewer disconnects? I can do that with the help of an extra MS Windows server and rdp, but is there a way of doing that without the Windows server?
Here's the scenario. I have multiple redhat servers (VMs) which have no... (3 Replies)
Discussion started by: ad101
3 Replies
10. SCO
I have inherited and SCO OpenServer Release 6 server. The clients connect using telnet to get to a proprietary database application for Service tickets. The issue I am currently having is that the connection just stops abruptly and you can see "telnet session terminated" on the terminal emulation... (22 Replies)
Discussion started by: sean6605
22 Replies
LEARN ABOUT SUSE
mail::spamassassin::dnsresolver
Mail::SpamAssassin::DnsResolver(3) User Contributed Perl Documentation Mail::SpamAssassin::DnsResolver(3)
NAME
Mail::SpamAssassin::DnsResolver - DNS resolution engine
DESCRIPTION
This is a DNS resolution engine for SpamAssassin, implemented in order to reduce file descriptor usage by Net::DNS and avoid a response
collision bug in that module.
METHODS
$res->load_resolver()
Load the "Net::DNS::Resolver" object. Returns 0 if Net::DNS cannot be used, 1 if it is available.
$resolver = $res->get_resolver()
Return the "Net::DNS::Resolver" object.
$res->nameservers()
Wrapper for Net::DNS::Resolver->nameservers to get or set list of nameservers
$res->connect_sock()
Re-connect to the first nameserver listed in "/etc/resolv.conf" or similar platform-dependent source, as provided by "Net::DNS".
$res->get_sock()
Return the "IO::Socket::INET" object used to communicate with the nameserver.
$packet = new_dns_packet ($host, $type, $class)
A wrapper for "Net::DNS::Packet::new()" which traps a die thrown by it.
To use this, change calls to "Net::DNS::Resolver::bgsend" from:
$res->bgsend($hostname, $type);
to:
$res->bgsend(Mail::SpamAssassin::DnsResolver::new_dns_packet($hostname, $type, $class));
$id = $res->bgsend($host, $type, $class, $cb)
Quite similar to "Net::DNS::Resolver::bgsend", except that when a response packet eventually arrives, and "poll_responses" is called,
the callback sub reference $cb will be called.
Note that $type and $class may be "undef", in which case they will default to "A" and "IN", respectively.
The callback sub will be called with three arguments -- the packet that was delivered, and an id string that fingerprints the query
packet and the expected reply. The third argument is a timestamp (Unix time, floating point), captured at the time the packet was
collected. It is expected that a closure callback be used, like so:
my $id = $self->{resolver}->bgsend($host, $type, undef, sub {
my ($reply, $reply_id, $timestamp) = @_;
$self->got_a_reply ($reply, $reply_id);
});
The callback can ignore the reply as an invalid packet sent to the listening port if the reply id does not match the return value from
bgsend.
$nfound = $res->poll_responses()
See if there are any "bgsend" response packets ready, and return the number of such packets delivered to their callbacks.
$res->bgabort()
Call this to release pending requests from memory, when aborting backgrounded requests, or when the scan is complete.
"Mail::SpamAssassin::PerMsgStatus::check" calls this before returning.
$packet = $res->send($name, $type, $class)
Emulates "Net::DNS::Resolver::send()".
$res->errorstring()
Little more than a stub for callers expecting this from "Net::DNS::Resolver".
If called immediately after a call to $res->send this will return "query timed out" if the $res->send DNS query timed out. Otherwise
"unknown error or no error" will be returned.
No other errors are reported.
$res->finish_socket()
Reset socket when done with it.
$res->finish()
Clean up for destruction.
perl v5.12.1 2010-03-16 Mail::SpamAssassin::DnsResolver(3)