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   |
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
|
|
|
Goto Forum:
Current Time: Mon Apr 28 11:05:09 CEST 2025
Total time taken to generate the page: 0.00837 seconds
|