01-11-2012
Quote:
I want to close socket in client, and wait until server confirm that disconnection was successful, before I make new connection. How to do this?
At the application level, you cannot - unless you have some out-of-band mechanism such as another connection between the client and server which will enable the server to send a message to the client confirming that the socket was successfully "disconnected".
This User Gave Thanks to fpmurphy For This Post:
10 More Discussions You Might Find Interesting
1. Cybersecurity
I'm trying to configure IDS9.40 on Ret Hat 9.
The server has opened the port 1526/tcp
nmap (nmap -sT -O linux) reports correctly that the port is open.
However, portqry (portqry.exe -n 192.168.0.101 -e 1526 -p TCP) reports that the port is closed for connection:
TCP port 1526 (turbo... (0 Replies)
Discussion started by: Juhasz Lajos
0 Replies
2. UNIX for Dummies Questions & Answers
I have a directory that is currently being shared by several clients. I would like to add another client and be able to mount it without kicking the other clients off.
I edited /etc/dfs/dfstab and added the client's hostname towards the end the line.
i.e. share -F nfs -o... (3 Replies)
Discussion started by: benq70
3 Replies
3. Programming
hello everyone. I tried searching for something related to this, but I figured it was time to ask my own question. I am experiencing these problems using Ubuntu 7.04
I am starting up a TCP listener/server and once connected, will act as a communication/control link with a program on another... (3 Replies)
Discussion started by: pjwhite
3 Replies
4. Programming
Hello everyone. Thanks for reading. I am using Ubuntu 7.04 to experience this problem:
I have written my own programs that communicate to eachother and I am having a hard time detecting a TCP socket disconnect when the remote side's computer has a power-failure (for example).
On the computer... (6 Replies)
Discussion started by: pjwhite
6 Replies
5. Programming
I made a program and now I need to make it concurrent.
Can someone pls help me do this ?
The code is this:
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>... (4 Replies)
Discussion started by: Johnny22
4 Replies
6. 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
7. Windows & DOS: Issues & Discussions
Hi All,
I need your expertise in finding a way to solve my problem.Please excuse if this is not the right forum to ask this question and guide me to the correct forum,if possible.
I am a DBA and on a daily basis i have to ftp huge dump files from my company server to my laptop and then... (3 Replies)
Discussion started by: kunwar
3 Replies
8. Red Hat
Hello,
I want to know the disconnection time of my broadband tcp/ip connection as it got disconnected while downloading data.
I use Vuze bit torrent client and JDownloader .
I use broadband internet connection and my os is slack 11. The problem I have been facing for last 2/3 days that my... (1 Reply)
Discussion started by: vectrum
1 Replies
9. 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
10. UNIX for Advanced & Expert Users
Dear Expert Users,
I know that Unix utility ( fuser ) is used to detect "transmission" of files from Source system to "current Linux Server".
I have scheduled this Unix script to work every 30th minutes of the hour and whenever files transmission starts at that very moment.
And, the file... (4 Replies)
Discussion started by: schandrakar1
4 Replies
LEARN ABOUT DEBIAN
net::dbus::binding::server
Net::DBus::Binding::Server(3pm) User Contributed Perl Documentation Net::DBus::Binding::Server(3pm)
NAME
Net::DBus::Binding::Server - A server to accept incoming connections
SYNOPSIS
Creating a new server and accepting client connections
use Net::DBus::Binding::Server;
my $server = Net::DBus::Binding::Server->new(address => "unix:path=/path/to/socket");
$server->connection_callback(&new_connection);
sub new_connection {
my $connection = shift;
.. work with new connection...
}
Managing the server and new connections in an event loop
my $reactor = Net::DBus::Binding::Reactor->new();
$reactor->manage($server);
$reactor->run();
sub new_connection {
my $connection = shift;
$reactor->manage($connection);
}
DESCRIPTION
A server for receiving connection from client programs. The methods defined on this module have a close correspondance to the
dbus_server_XXX methods in the C API, so for further details on their behaviour, the C API documentation may be of use.
METHODS
my $server = Net::DBus::Binding::Server->new(address => "unix:path=/path/to/socket");
Creates a new server binding it to the socket specified by the "address" parameter.
$status = $server->is_connected();
Returns zero if the server has been disconnected, otherwise a positive value is returned.
$server->disconnect()
Closes this server to the remote host. This method is called automatically during garbage collection (ie in the DESTROY method) if the
programmer forgets to explicitly disconnect.
$server->set_watch_callbacks(&add_watch, &remove_watch, &toggle_watch);
Register a set of callbacks for adding, removing & updating watches in the application's event loop. Each parameter should be a code
reference, which on each invocation, will be supplied with two parameters, the server object and the watch object. If you are using a
"Net::DBus::Binding::Reactor" object as the application event loop, then the 'manage' method on that object will call this on your
behalf.
$server->set_timeout_callbacks(&add_timeout, &remove_timeout, &toggle_timeout);
Register a set of callbacks for adding, removing & updating timeouts in the application's event loop. Each parameter should be a code
reference, which on each invocation, will be supplied with two parameters, the server object and the timeout object. If you are using a
"Net::DBus::Binding::Reactor" object as the application event loop, then the 'manage' method on that object will call this on your
behalf.
$server->set_connection_callback(&handler)
Registers the handler to use for dealing with new incoming connections from clients. The code reference will be invoked each time a new
client connects and supplied with a single parameter which is the "Net::DBus::Binding::Connection" object representing the client.
AUTHOR
Daniel P. Berrange
COPYRIGHT
Copyright (C) 2004-2011 Daniel P. Berrange
SEE ALSO
Net::DBus::Binding::Connection, Net::DBus::Binding::Bus, Net::DBus::Binding::Message::Signal, Net::DBus::Binding::Message::MethodCall,
Net::DBus::Binding::Message::MethodReturn, Net::DBus::Binding::Message::Error
perl v5.14.2 2011-06-30 Net::DBus::Binding::Server(3pm)