9 More Discussions You Might Find Interesting
1. Programming
believe it or not but this is my first c program (i've worked with java, C#, php though) I am trying to make a daemon that checks if mplayer is running(it's for a projection room) and if it is not then to run mplayer with a file.. So far it's not working and I don't know why
Help and comments... (5 Replies)
Discussion started by: james2432
5 Replies
2. Programming
i want to write a daemon service which listens the 8080 port and write down all the details in one file. How can i do this ? (2 Replies)
Discussion started by: santosh123
2 Replies
3. Programming
Hi ,
I want to know how to write a daemon process. I also want to know the concept behind daemon processes. Any material or sample program will be great :) .
Thanks in advance
-sg (2 Replies)
Discussion started by: sg6876
2 Replies
4. AIX
Does anyone out there use rsync on AIX 5.2, I've installed and would like to run in server mode, I've setup in services and inetd.conf and refreshed inetd. The rsync daemon however does not start, I've also tried rsync --daemon, this just returns to the # prompt. The rsync command itself appears to... (1 Reply)
Discussion started by: gefa
1 Replies
5. Programming
how to convert a c program into a Daemon.
thanks in advance
svh (2 Replies)
Discussion started by: svh
2 Replies
6. Shell Programming and Scripting
Hello, id like to know how can i do for making my script a daemon. Im not sure, but once , i might read about a "daemon" command. Thats true? Whats it for? It isnt in my man. (2 Replies)
Discussion started by: Jariya
2 Replies
7. Programming
Hello,
i am very very puzzled,
im doing this project for school, its a deamon logger, but anyways
I'm supposed to run the daemon, let it run on the backgroun, and then run a different program (from command like prompt). but when i run my daemon, it never goes back to the nova> prompt. :(
i dont... (3 Replies)
Discussion started by: Kacyndra
3 Replies
8. Shell Programming and Scripting
How in the world do you create a daemon and get it to start with a startup script? could someone tell me in detail im going nuts...thanks (1 Reply)
Discussion started by: nmajin
1 Replies
9. Programming
I want to write background running program. How to use daemon function. Please send me source code.
Thanks. (1 Reply)
Discussion started by: bat_oyu
1 Replies
Mojo::IOLoop::Client(3pm) User Contributed Perl Documentation Mojo::IOLoop::Client(3pm)
NAME
Mojo::IOLoop::Client - Non-blocking TCP client
SYNOPSIS
use Mojo::IOLoop::Client;
# Create socket connection
my $client = Mojo::IOLoop::Client->new;
$client->on(connect => sub {
my ($client, $handle) = @_;
...
});
$client->on(error => sub {
my ($client, $err) = @_;
...
});
$client->connect(address => 'mojolicio.us', port => 80);
DESCRIPTION
Mojo::IOLoop::Client opens TCP connections for Mojo::IOLoop.
EVENTS
Mojo::IOLoop::Client can emit the following events.
"connect"
$client->on(connect => sub {
my ($client, $handle) = @_;
...
});
Emitted safely once the connection is established.
"error"
$client->on(error => sub {
my ($client, $err) = @_;
...
});
Emitted safely if an error happens on the connection.
ATTRIBUTES
Mojo::IOLoop::Client implements the following attributes.
"reactor"
my $reactor = $client->reactor;
$client = $client->reactor(Mojo::Reactor::Poll->new);
Low level event reactor, defaults to the "reactor" attribute value of the global Mojo::IOLoop singleton.
METHODS
Mojo::IOLoop::Client inherits all methods from Mojo::EventEmitter and implements the following new ones.
"connect"
$client->connect(address => '127.0.0.1', port => 3000);
Open a socket connection to a remote host. Note that TLS support depends on IO::Socket::SSL and IPv6 support on IO::Socket::INET6.
These options are currently available:
"address"
Address or host name of the peer to connect to, defaults to "localhost".
"handle"
Use an already prepared handle.
"local_address"
Local address to bind to.
"port"
Port to connect to.
"timeout"
Maximum amount of time in seconds establishing connection may take before getting canceled, defaults to 10.
"tls"
Enable TLS.
"tls_ca"
Path to TLS certificate authority file. Also activates hostname verification.
"tls_cert"
Path to the TLS certificate file.
"tls_key"
Path to the TLS key file.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojo::IOLoop::Client(3pm)