here is the server and client side code now there is a bug after which the server enters an infinite loop.the server is designed as an echo server and if it reads /q then the server closes while the client can send messages till /q now after the frst msg when another msg is send infinite loop is... (3 Replies)
Hi guys, I'm having a problem getting my infinite loop to loop. It simply reads in the users choice form the menu, executes the corresponding case statement and quits instead of looping back to the main menu again. I have a feeling it might be something with my if then statements within the case... (2 Replies)
I wanted to copy (not forward but copy) all incoming email to another address of mine. It worked, but now I encountered an infinite loop problem: When the second address doesn't like the content and bounces the message back, the bounce message will be sent back and forth.
So, what I have in... (1 Reply)
Hi All,
I need to run an infinite loop.
requirement below:
function1 --> creates a file file1
function2 ---> need to call if the file creates
i am running these both function via a script --> script.sh
i need to run the function1 first and if the file file1 creates then need to run the... (3 Replies)
Hi All,
I have a problem with auto telnet script, but I want to tell u something
a) I am only a member access on the server, so not able to access 'root' account
b) not able to install any software on server
3) On server, there is not install 'except'
I have to write a script, which is ran... (0 Replies)
Hi All,
I have a problem with auto telnet script, but I want to tell u something
a) I am only a member access on the server, so not able to access 'root' account
b) not able to install any software on server
3) On server, there is not install 'except'
1. The problem statement, all variables... (0 Replies)
Hi All,
I have a problem with auto telnet script, but I want to tell u something
a) I am only a member access on the server, so not able to access 'root' account
b) not able to install any software on server
3) On server, there is not install 'except'
1. The problem statement, all variables... (8 Replies)
Hi, I was debating if I should put this in the dummies or scripts section, I apologize in advance if I chose poorly.
Fairly new to Unix and BASH scripting but I thought I made it fairly well given my limited understanding. However, the output indicates that it's looping and I'm ending up with a... (5 Replies)
Hi Gurus,
I am trying to write a script for checking the status of linux servers by connecting via telnet with port no but to terminate i have to manually type "quit" .how can i terminate the telnet session in script itself.For E.g
=========================================
telnet ipaddress... (3 Replies)
Discussion started by: kapil514
3 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)