summaryrefslogtreecommitdiff
path: root/common/udpovertcp.py
diff options
context:
space:
mode:
authorDiego Roversi <diegor@tiscali.it>2019-09-08 22:05:57 +0200
committerDiego Roversi <diegor@tiscali.it>2019-09-08 22:05:57 +0200
commitc23b138ed72d794521b19ff7d8076b32b0b7bf46 (patch)
treec8e82a4ca4da05ba1ad28d4ff64a157bc1eb7952 /common/udpovertcp.py
parent1d9925c287b318ec21343e2682b51ab6a36ae8db (diff)
2to3
Diffstat (limited to 'common/udpovertcp.py')
-rw-r--r--common/udpovertcp.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/udpovertcp.py b/common/udpovertcp.py
index eae3d6b..f99b2b3 100644
--- a/common/udpovertcp.py
+++ b/common/udpovertcp.py
@@ -1,5 +1,5 @@
from socket import *
-from msgstruct import *
+from .msgstruct import *
#from fcntl import ioctl
#from termios import TIOCOUTQ
from zlib import compressobj, Z_SYNC_FLUSH
@@ -19,12 +19,12 @@ class SocketMarshaller:
# try to reduce TCP latency
try:
tcpsock.setsockopt(SOL_IP, IP_TOS, 0x10) # IPTOS_LOWDELAY
- except error, e:
- print "Cannot set IPTOS_LOWDELAY for client:", str(e)
+ except error as e:
+ print("Cannot set IPTOS_LOWDELAY for client:", str(e))
try:
tcpsock.setsockopt(SOL_TCP, TCP_NODELAY, 1)
- except error, e:
- print "Cannot set TCP_NODELAY for client:", str(e)
+ except error as e:
+ print("Cannot set TCP_NODELAY for client:", str(e))
compressor = compressobj(6)
self.compress = compressor.compress
self.compress_flush = compressor.flush