Code:
# client
import socket
import thread
getHOST = (raw_input('Enter the Host: '))
HOST = getHOST
PORT = 150 # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
NAME = raw_input('Enter your name: ')
s.send(NAME)
data = s.recv(1024)
print data
def checkMessage():
while 1:
try:
data = s.recv(1024)
print data
except:
return None
thread.start_new_thread(checkMessage,())
while True:
MSG = raw_input('>> ')
s.send(MSG)
#if MSG == "quit": break
s.close()
Made -alot- of progress! The ONLY issue I can see as of right now is that this thread isn't working that constantly reads for incoming data - any help is greatly appreciated.