Sinking Data

Sometimes it is desirable to ignore all incoming data while still maintaining the connection opened. The sock.sinkdata property allows you to do just that.

Set sock.sinkdata = 1 — YES and all incoming data will be automatically discarded. This means that the on_sock_data_arrival event will not be generated, reading sock.rxlen will always return zero, and so on. No data will be reaching its destination, even in the case of buffer redirection. Inband commands, however, will still be extracted from the incoming data stream and processed. The sock.connectiontout and sock.toutcounter read-only properties will work correctly as well.

A warning note icon.Data sinking should not be used on a socket that is running in the TLS mode.