NB5 Docs► Reference Section► Drivers▼ tcpserver 🖺


tcpserver acts like a server push version of stdout over TCP

The tcpserver driver is based on the behavior of the stdout driver. You configure the tcpserver driver in exactly the same way as the stdout driver, except for the additional parameters shown here.

The tcpserver driver listens on a configured host and port (a socket address). When any clients are connected, the internal queue is buffered to them as long as there is data in it. For each cycle of data in the internal buffer, one of the connected clients will get it in unspecified order.

The driver activity will block as long as there are still messages in the queue (Max:capacity). To ensure that the queue is empties and the activity shuts down correctly, one must make sure that a client connects to the server to receive the queued messages.

If the buffer is primed with data when a client is connected it will get all of the data at once. After this, data is added to the buffer at whatever cyclerate the activity is configured for. If you add data to the buffer faster than you can consume it with connected clients, you will have a number of failed operations.

However, the opposite is not true. You should generally ensure that you can consume the data as fast as you provide it, and the error counts give you a relatively easy way to verify this. If you wish to disable this behavior, set the retries to a very high value. In this case, the tries metric will still give you some measure of internal buffer saturation.


Run a stdout activity named 'stdout-test', with definitions from activities/stdout-test.yaml

... driver=tcpserver yaml=stdout-test

Driver Parameters

Statement Format

Refer to the help for the stdout driver for details.

Back to top