TCP socket with getopt enabled