Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Best way to write a socket server service in win32

by Jouke (Curate)
on Apr 14, 2004 at 07:38 UTC ( #344949=note: print w/replies, xml ) Need Help??


in reply to Best way to write a socket server service in win32

I think we could really help you better if you showed us the code you tried (or an excerpt), and tell us what went wrong...


Jouke Visser, Perl 'Adept'
Using Perl to help the disabled: pVoice and pStory
  • Comment on Re: Best way to write a socket server service in win32

Replies are listed 'Best First'.
Re: Re: Best way to write a socket server service in win32
by golemwashere (Acolyte) on Apr 14, 2004 at 08:28 UTC
    Yup 8)
    For example when I'm using PerlSvc and my startup sub is
    sub Startup { while(ContinueRun($delay)) { $server = IO::Socket::INET->new(LocalPort => $server_port, Type => SOCK_STREAM, Reuse => 1, Listen => 10 ) # or SOMAXCONN or die "Couldn't be a tcp server on port $server_port : $@\n"; while ($client = $server->accept()) { # $client is the new connection $client->autoflush(1); while ( <$client>) { $line=$_; open OUTPUT, ">>$logfile" or die "Cannot open $logfile :$!"; print OUTPUT $line; close OUTPUT; next; } } }
    the service starts but doesn't bin the socket (while in a standalone .exe it does )
    Thanks a lot G.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://344949]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2016-12-02 21:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (50 votes). Check out past polls.