Hello!
again i am stuck in a surely trivial and stupid problem, showing again
that i didn't understand a single thing about POE....
(thus the general POE questions at the end of this mail, you might want
ot jump directly there searching for 'GENERAL QUESTIONS')
anyways...
i am trying to move a service actually based on a script run amidst
xchat to a client server type setup (that's why i needed the ssl
layer...)
actually it works without the ssl stuff since i decided to continue
setting the thing up without that lib, to see if its possible to get it
actually working...
i took the client server example from the cook book and began to extend
it... worked quite nicely until i decided to integrade a Term::ReadLine
to the client...
the first thing i noticed was that it completely blocked the POE
system... thus i tryed to get it running through the event system of
POE....
for this i created a new class, which starts an own session (listening
to 'shell' events) and starting on the "runShell" event a new
instance of Term::ReadLine
unfortunately that event is gobbled up somewhere by some other
session.... i suppose the POE::Component::Client::TCP thing is
responsible for that...
i have put the stuff up on http://bboett.dyndns.org/~bboett/leve.tgz
the interesting parts are: POE::Component::Leve::leveShell
and search for runShell (3 occurences: set up of the session, sending
the runshell event, and the actual thing that set ups the shell)
the thing gots called from patternQuery.pl, CTOR of
POE::Component::Client::TCP under the event Connected (shell->init)
to start the whole system, run in one shell patternServer.pl, in another
patternQuery.pl (that's the client...)
so if someone could be kind enough and look through my messed up code
and tell my what's going wrong, why and how to correct it...
GENERAL QUESTIONS:
This shuffled up again the fact that i still have problems understanding
POE....
- i have several objects, they might start up their own sessions, since
POE is somehow a global thing, i need to call the kernel run method only
once somewhere, right?
- events are generated and distributed randlomly to the listeners, once
one listener claims the event, it isn't propsed to the other sessions,
right? or is there some sort of telling that the events should be
proposed also to the other sessions?
- to the above question addendum, i didn't get the difference between
post and signal, when should i use which one? in all the code i see only
the use of post, never signal, should i use signal this time??
- sessions like the TCP stuff and the IRC module register an alias iwth
which it is possible to get it later on globally from the heap, how do i
setup such a mechanism? alias isn't a recognized var of session?
- i have a job that is returning only when the wholething closes down
(= a shell) with very slow input (a human user) that qualifies as a long
running task... actually i run it inside a POE event handler, but
should i use the ::Run object instead? do i cause some havoc somewhere
by blocking the return of that event processing or doesn't it matter??
if you got this far, my gratefulness and sympathy, ethernal adoration to
you if you manage to help me on that :D
sorry for the long post...
and if stuff isn't very clear: please keep in mind that i am not a
native english speaker
--
ciao bboett
==============================================================
[EMAIL PROTECTED]
http://inforezo.u-strasbg.fr/~bboett
===============================================================