About ofxNetwork, client lag and notification of received packets

(I’ve summed up the question)

I am curious about lag in the networkTcpClientExample so I made an application that sends and message and expects an answer and I managed to see the lag (it is less than 1/60 of a second).
I used a similar code as the following, emision on one line, reception on the following.

  
		if(tcpClient.send(msgTx)){  
			string str = tcpClient.receive();  
			if( str.length() > 0 ){  
				msgRx = str;  
			}  
		}  

It seems overkill to send so many packets over TCP on every update() cycle and I would like to be able differentiate between messages with the same content sent at different times, so these are my questions:

  • 1-Is there something like a vidPlayer.isFrameNew() boolean for new received packets?

  • 2-Is there an ofEvent that notifies when a new tcp packet is received?

  • 3-Is there such a thing as a received packets buffer and can it become full and ultimately crash an application?

Thanks in advanced.

Hello! First of all Happy New Year! Hope you had a great time! =D

Back to the thread, can anyone help me out on the doubts I had posted? It’s not much but it will point me in the right direction for this:
http://forum.openframeworks.cc/t/looking-for-advice-for-a-permanent-installation/11007/14

Example code is not necessary, just a push in the right direction. Even if the answers to the first two are no it will still help me out greatly.
Thank you!