that looks pretty interesting. I'll probably take the easy way out for
this project, but I'll bookmark that for later ... thanks.
>
> Daniel - you really should take a look at POE (http://poe.perl.org/)
>
--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - langu
if you take out the "chatter" part, it works perfectly. You can run
the program, do "telnet localhost 1000", and it will echo each line
you send back at you. That part has been OK for weeks, until I tried
to add this reporter function. It's like a file - readline on $SOCK to
get a line, writeline t
That code doesn't really make sense. It looks like ur trying to talk to
urself on the same port?? Make a seperate script that listens on a port and
just prints whatever it gets to the screen. Then have ur threaded app do
the talking in a threaded environment. And ur never putting anything in th
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Daniel McBrearty
> Sent: Friday, October 27, 2006 6:17 AM
> To: $Bill Luebkert
> Cc: perl-win32-users@listserv.ActiveState.com
> Subject: Re: sharing access to a socket
>
Daniel McBrearty wrote:
> thanks Bill. but why is it so inadvisable? I don't get it. I'd have
> thought that some app where you want one task to execute periodically
> while another responds to user input was exactly where you should use
> threads. (I'll look into your suggestions though.)
I agre
thanks Bill. but why is it so inadvisable? I don't get it. I'd have
thought that some app where you want one task to execute periodically
while another responds to user input was exactly where you should use
threads. (I'll look into your suggestions though.)
It seems to be some weirdness in dealin
Daniel McBrearty wrote:
> Now I want to run a thread inside this app that sends back info
> regularly. It needs to run in a seperate thread, and be startable and
> stoppable, which I have working. I don't care if the responses from
> the main thread and the reporter thread lines are mixed up ... i
Thanks guys.
I like the look of Chris's queue idea, so I tried it ... but still no
joy. Here's the test code. did I screw up ... ?
i'll post this over at perl monks too as I saw some related discussion there.
regards
Daniel
==
use strict;
use warnings;
use threads;
use Thread::Queue;
At 11:59 AM 10/27/2006 +0200, Daniel McBrearty wrote:
>Now I want to run a thread inside this app that sends back info
>regularly. It needs to run in a seperate thread, and be startable and
>stoppable, which I have working. I don't care if the responses from
>the main thread and the reporter thread
An: perl-win32-users@listserv.activestate.com
Cc:
Betreff: sharing access to a socket
Hi
I have an app I'm writing which runs as a background process,
communicating with the main app over a localhost socket. It'
BTW, what i get before I do teh "shared" thing is that the reports are
getting back, but not on time, in a seemingly random way as I type
characters on teh client side. I tried adding $SOCK->flush; to
sockout() but that doesn't help.
On 10/27/06, Daniel McBrearty <[EMAIL PROTECTED]> wrote:
> Hi
>
Hi
I have an app I'm writing which runs as a background process,
communicating with the main app over a localhost socket. It's a little
server.
the basic code looks like this:
my $SOCK;
my $sock = new IO::Socket::INET
$SOCK = $sock.accept();
while (1) {
my $line;
while ($line = <$S
12 matches
Mail list logo