Another option which has nearly the same effect as turning off/on individual connections would be to re-assign the Connections property when you need to change the connections, e.g.:
SiAuto.Si.Connections = ‘file(), tcp()’;
// Then later when you don’t the TCP connection anymore:
SiAuto.Si.Connections = ‘file()’;
I say nearly the same effect, because this would effectively also disconnect/reconnect the file connection temporarily, and depending on the connection options you use, also reset connection buffers like the backlog feature, for example.
I hope this helps,