This is an example (i did intentionally kept as closed to your code as i could)
$REPLY is the build-in variable that works with select case statement (ksh)
Hi,
I have a problem in pasting a url in the thread. I tried many a times and i keep failing.
Can u tell me what's wrong?
I go by the instructions that appear after clicking the http:// but still i fail. The link does not appear properly in the threads that i post.
Thanks,
Nisha (3 Replies)
Hi,
I would be very happy if someone could help me please. I am relatively new to UNIX, and still learning.
My understanding of things are:
Say I have a PC running Windows. This machine has a name. If I have 10 PC's, then I have 10 names, one for each PC. Each PC is independent of the other.... (4 Replies)
Hi
I am trying to set up two hosts in a reverse proxy. The reverse proxy already has 8 servers running perfectly, but they are all simply mapping pure addresses, which I have registered internally and externally.
The latest two I wish to add are a bit different, they are app servers, one... (1 Reply)
Hi,
I am trying to upload a file to a SQL database table. The column type is IMAGE. I am looking for a solution to upload a word doc file. I tried 3 approaches.
1) my $fileToStore = "mytest.doc";
open IPFILE, "<", $name;
binmode IPFILE;
while (<IPFILE>)
{
$fileToStore .= $_;
}
close... (1 Reply)
hello folks,
i am stuck with this awk command. i need to calculate the sum of a column of values on a flatfile and i am using the following command :
awk -F"|" '{x += $10} END {print "Sum: "x}' standard_csv_file1.out
that flatfile contains 180 fields and i am getting the... (5 Replies)
Hi,
I have used the following command to get result using some program and got desired output but I am unable to understand the last part: sort -k5,5 -rn|head -n 10
grep Centre groups.dat |sort -k5,5 -rn|head -n 10
Please guide.
Thanks (2 Replies)
Hi ,
i have a shell script with the first two lines as
#! /bin/ksh
set -x
when i try opening the file from unix using the command 'sh filename.sh' , i am getting the below error :
invalid optionline 2: set: -
Pls help
Use code tags for you code and data... (1 Reply)
I have not been able to append the contents of many files into one file. I have executed the CAT command shown below separately substituting an actual path and file name for the array variable to verify that I have the syntax correct. The bottom line - nothing is happening with CAT. I am running... (16 Replies)
Discussion started by: demmith
16 Replies
LEARN ABOUT DEBIAN
event::rpc::loop
Event::RPC::Loop(3pm) User Contributed Perl Documentation Event::RPC::Loop(3pm)NAME
Event::RPC::Loop - Mainloop Abstraction layer for Event::RPC
SYNOPSIS
use Event::RPC::Server;
use Event::RPC::Loop::Glib;
my $server = Event::RPC::Server->new (
...
loop => Event::RPC::Loop::Glib->new(),
...
);
$server->start;
DESCRIPTION
This modules defines the interface of Event::RPC's mainloop abstraction layer. It's a virtual class all mainloop modules should inherit
from.
INTERFACE
The following methods need to be implemented:
$loop->enter ()
Enter resp. start a mainloop.
$loop->leave ()
Leave the mainloop, which was started with the enter() method.
$watcher = $loop->add_io_watcher ( %options )
Add an I/O watcher. Options are passed as a hash of key/value pairs. The following options are known:
fh The filehandle to be watched.
cb This callback is called, without any parameters, if an event occured on the filehandle above.
desc
A description of the watcher. Not necessarily implemented by all modules, so it may be ignored.
poll
Either 'r', if your program reads from the filehandle, or 'w' if it writes to it.
A watcher object is returned. What this exactly is depends on the implementation, so you can't do anything useful with it besides
passing it back to del_io_watcher().
$loop->del_io_watcher ( $watcher )
Deletes an I/O watcher which was added with $loop->add_io_watcher().
$timer = $loop->add_timer ( %options )
This sets a timer, a subroutine called after a specific timeout or on a regularly basis with a fixed time interval.
Options are passed as a hash of key/value pairs. The following options are known:
interval
A time interval in seconds, may be fractional.
after
Callback is called once after this amount of seconds, may be fractional.
cb The callback.
desc
A description of the timer. Not necessarily implemented by all modules, so it may be ignored.
A timer object is returned. What this exactly is depends on the implementation, so you can't do anything useful with it besides passing
it back to del_io_timer().
$loop->del_timer ( $timer )
Deletes a timer which was added with $loop->add_timer().
DIRECT USAGE IN YOUR SERVER
You may use the methods of Event::RPC::Loop by yourself if you like. This way your program keeps independent of the actual mainloop module
in use, if the simplified interface of Event::RPC::Loop is sufficient for you.
In your server program you access the actual mainloop object this way:
my $loop = Event::RPC::Server->instance->get_loop;
Naturally nothing speaks against making your program to work only with a specific mainloop implementation, if you need its features. In
that case you may use the corresponding API directly (e.g. of Event or Glib), no need to access it through Event::RPC::Loop.
AUTHORS
Joern Reder <joern at zyn dot de>
COPYRIGHT AND LICENSE
Copyright (C) 2002-2006 by Joern Reder, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2006-04-23 Event::RPC::Loop(3pm)