Using TCP protocol for streaming images
TCP is the basis for all the Internet protocols, for example, HTTP. This is an error-checking protocol, which guarantees obtaining valid data and notifying errors. This makes it appropriate for sending big volumes of data from computers, not only in your local network, but also around the world.
For working with TCP in openFrameworks, you need to use the ofxNetwork addon.
Tip
We suggest that the first time, you should try TCP with openFrameworks examples: networkTcpServerExample
and networkTcpClientExample
, located in openFrameworks's folder examples/addons
. Run both of them on one PC, and then activate the window of networkTcpClientExample
and press some keys. You will see that the keys will be sent to networkTcpServerExample
and printed on its screen.
For linking the ofxNetwork addon, there are three options similar to the ofxOsc addon. Check the beginning of the Using OSC protocol section for details.
The scheme of working with TCP is based on the client...