Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Socket Communication 101
Re: Socket Communication 101 [message #39671 is a reply to message #39664] Tue, 16 April 2013 19:51 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Thanks for the link, I saved that and also the document so it can be read off line.

Yes the data does get buffered but the difference was in my code.
Before it was like this:

getline
reformat
send

That was one packet.

getline
reformat
send

That was another packet.

etc. for each line.

It is the time required to send each individual packet that is important before they get corrupted or out of order.


Now the code is like this:

getline
reformat, keep the \n but remove the \0
add to buffer
get next line
reformat, keep the \n but remove the \0
add to buffer

etc until all lines are added to buffer
add \0
send

That is one packet

The amount of data or size of the buffer is irrelevant at least for the amount I have been working with.
By the time the Upp file choose box disappears all paths are displayed in the Java app.

Upp is great to be able to make changes.

[Updated on: Tue, 16 April 2013 19:54]

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: Tue May 14 23:47:23 CEST 2024

Total time taken to generate the page: 0.01990 seconds