Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > how to share socket handle across threads?

Reply
Thread Tools

how to share socket handle across threads?

 
 
Sebastien
Guest
Posts: n/a
 
      07-07-2003
Hello,

I've been rtfm'ing for days but can't a solution to this problem:

I have a thread that receives multiple client request thanks to an
endless loop through the accept() method. The new socket object
returned by accept() must be communicated to another master thread. I
am using the IO::Socket module.

When trying to use threads::shared or Thread::Queue, I keep getting
this failure:
Invalid value for shared scalar at ./X.pl line N.

So is there a way to share a socket/file handle accross threads?

Thank you

Sebastien
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
Re: socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 0 02-01-2009 07:37 AM
socket.unbind or socket.unlisten? - socket.error: (48, 'Addressalready in use') Laszlo Nagy Python 1 01-27-2009 05:05 PM
Re: socket.unbind or socket.unlisten? - socket.error: (48,'Address already in use') Jean-Paul Calderone Python 0 01-27-2009 01:41 PM



Advertisments