Solution: parse the value set by the ZMQ_PRE_ALLOCATED_FD sockopt when creating a new TCP socket and use it if valid. Add new tests/test_pre_allocated_fd_tcp.cpp unit test.