# Client example 2: client2.py 
# Run the client after the server is running
# CSC 249 Class example, 
# J Cardell, Feb 13, 2017

from socket import * # Import socket module 

s = socket()         # Create a socket object 
host = gethostname() # Get local machine name 
port = 12345         # Assign a port 

print ("Client host is ", host)
s.connect((host, port)) 
print (s.recv(1024))
 
s.close()            # Close the socket when done
