We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › processing.net server question
Page Index Toggle Pages: 1
processing.net server question (Read 745 times)
processing.net server question
May 14th, 2005, 9:46am
 
Well, I've been mucking about with more and more Processing libraries and I've come to a question:

Is there a way to make the server send a message to just one specific connected client's IP?  According to the reference, write() broadcasts to every client.

Thanks!
Tim
Re: processing.net server question
Reply #1 - May 14th, 2005, 3:13pm
 
Hmm... if they're using TCP communication protocol it should be possible, but might not be a part of the library.
Re: processing.net server question
Reply #2 - May 14th, 2005, 3:17pm
 
the net lib is a little sparse still, as is the reference, but it'll improve a little..

for now, add
void serverEvent(Client c) {
 // do something
}
to your sketch, this will tell you each time a client connects. then you can keep track of the client list in your sketch, and write to any of them you'd like. unfortunately the client list isn't currently exposed in the api.. i'll fix that soon.
Re: processing.net server question
Reply #3 - May 14th, 2005, 6:14pm
 
fyi, improved net documentation is in process.
Re: processing.net server question
Reply #4 - May 14th, 2005, 8:56pm
 
wow, that's really great!

thanks for all your work with Processing
tim
Re: processing.net server question
Reply #5 - Oct 20th, 2007, 9:37pm
 
for anyone coming across this old thread, these features have been added to 0131.
Page Index Toggle Pages: 1