Protocol Questions for Touch In/Out DATs

I don’t have a networking background, so was hoping to get a bit more context/explanation on the following:

Protocol

TCP/IP vs UDP - if I’m just sending unicast between two instances of Touch, is there any reason to use UDP if it’s not as reliable as TCP/IP? Are there any ‘gotchas’ with either protocol that makes you use one over the other?

Shared Connection

The documentation says “Use the same connection as other networking DATs using the same network protocol.”

What does this mean? In what scenarios should I have this set to off

Port Numbers

Each pair of In and Out DATs needs a matching pair of port numbers that’s different from any other pair, lest they cross streams. When selecting a unique port number, how do you know what ports are safe to use (ie. not reserved by other protocols/apps)?

Bons port question: Sometimes they get ‘clogged’ after an instance of TD crashes, and I have to select a different pair to get an In and Out to communicate again. Is this common?

UDP sends the message right away, TCP may wait a bit to see if more data is incoming before sending, as way to package up more data into a packet. TCP can be a bit more bursty for that reason.

Shared connection means multiple DATs are all using the same port to send and receive. In general you should leave them on. If for some reason you are sending to a port on another machine and wanted multiple connections to it, then you could turn it off.

I tend to use ‘netstat’ command to see what ports are in use. There are likely better tools for this though.

1 Like

How can this work if you have certain In DATs expecting certain data, and you don’t want them receiving data from an incorrect Out DAT?

The are still separated by the port you choose. So if they have a different port set, then they won’t be sharing data.

1 Like