U++ framework
Do not panic. Ask here before giving up.

Home » Community » Newbie corner » Socket Communication 101
Re: Socket Communication 101 [message #38243 is a reply to message #38242] Fri, 07 December 2012 19:45 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
sock.Put("-- BEGIN FRUIT LIST --\n");

for(int i = 0; i < FruitList.GetCount(); i++)
sock.Put(FruitList[i] + '\n');

sock.Put("-- END FRUIT LIST --\n");

Each sock.Put would be a different connect/disconnect, not good.

Add all the char to a single string or buf with the \0 at the end and send that.
One connect/disconnect

[Updated on: Fri, 07 December 2012 19:48]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ScatterCtrl / ScatterDraw - ShowLegend() problem and general Question
Next Topic: Spin + Text
Goto Forum:
  


Current Time: Mon Apr 27 03:32:33 GMT+2 2026

Total time taken to generate the page: 0.00671 seconds