Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Doubt about TCPSocket.write

Can you explain better the functioning of the method of 'write' in Titanium.Network.TCPSocket? For example when using kitchensink bonjourSocket.write () is the BonjourSocket who is 'talking' to all the other sockets available on the network? or another socket that is called the write up bonjourSocket and sent a message?

I hope we have explanation, since the documentation is not very clear on this, thanks

— asked October 12th 2010 by Mattia Zanetti
  • bonjour
  • tcpsocket
0 Comments

2 Answers

  • It's from your point of view so if you call socket.write, you are sending information. If you get a read event, you are receiving information from another source.

    — answered October 12th 2010 by John McKnight
    permalink
    0 Comments
  • Maybe I have not explained, but the question is whether I want to send a message to all I have to do a write to any available socket, or by write to my socket then talk to all the listening socket?

    — answered October 12th 2010 by Mattia Zanetti
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.