in reply to Re: Re: sharing variables with threads
in thread sharing variables with threads

No, you are not going to be able to do it the way you are attempting, you will have to keep a list of client connections, and every time you get a line from one client, go through the list and send it to every other client. This would actually work better without threads, using a server that sets all the clients to be non-blocking.


We're not surrounded, we're in a target-rich environment!
  • Comment on Re: Re: Re: sharing variables with threads

Replies are listed 'Best First'.
Re: Re: Re: Re: sharing variables with threads
by Anonymous Monk on Mar 13, 2003 at 02:09 UTC
    i was thinking of doing it that way, but i didnt exactly know what i would be grabbing, i figured it would just be throwing the $client variable into an array each time a new connection was made, but when i tried it it didn't work.