tcp socket with getopt()