Aug-06-2018, 06:32 AM
what i would like to have in Python (i already have it in C) is a program that starts as a command that take a port number, a remote host name or remote IP address, and a remote port number, and then drops into the background and releases the controlling tty (so it won't be killed when the user logs out). it then listens to the first port number for incoming TCP connections and waits. when a connection comes in, it forks a child process (not thread) to handle it, and resumes waiting for more incoming connections. the child (just one process per incoming connection) connects to the remote host and port specified by 2nd and 3rd command arguments. once the connection is complete, it transfers all data, 8 bits wide, in both directions, between the incoming TCP connect and the connection it made to a remote host. when either side disconnects, it completes sending the final data, starts a 10 second timeout to exit, and waits.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.