Commit 619f9276 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Debugged talk client

parent 6548f5d9
#!/usr/bin/env python #!/usr/bin/env python
import sys import sys
import socket import socket
from os.path import abspath, dirname
basepath = abspath(dirname(abspath(__file__)) + '/..')
sys.path.insert(0, basepath)
from websocket import websocket from websocket import websocket
from connection import Connection from connection import Connection
...@@ -25,11 +29,11 @@ if __name__ == '__main__': ...@@ -25,11 +29,11 @@ if __name__ == '__main__':
try: try:
while True: while True:
msg = TextMessage(raw_input()) msg = TextMessage(raw_input())
print 'send: %s', msg print 'send:', msg
conn.send(msg) conn.send(msg)
try: try:
print 'recv: %s' % conn.recv() print 'recv:', conn.recv()
except socket.timeout: except socket.timeout:
print 'no response' print 'no response'
except EOFError: except EOFError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment