Guest User

Untitled

a guest
Dec 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. gets an IP or hostname address to connect to as commandline argument, i. e.
  2.  
  3. creates socket with socket()
  4.  
  5. makes a connection with connect()
  6.  
  7. prompts user to input a string to send to the server. reads the string, sends to the server with write().
  8.  
  9. when receives an answer from the server, prints it to standard output.
  10.  
  11. stays connected as long as server does not close the connection.
Add Comment
Please, Sign In to add comment