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

Debugged talk client

parent 6548f5d9
#!/usr/bin/env python
import sys
import socket
from os.path import abspath, dirname
basepath = abspath(dirname(abspath(__file__)) + '/..')
sys.path.insert(0, basepath)
from websocket import websocket
from connection import Connection
......@@ -25,11 +29,11 @@ if __name__ == '__main__':
try:
while True:
msg = TextMessage(raw_input())
print 'send: %s', msg
print 'send:', msg
conn.send(msg)
try:
print 'recv: %s' % conn.recv()
print 'recv:', conn.recv()
except socket.timeout:
print 'no response'
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