Skip to content

Commit

Permalink
printer_tcp set TCP_NODELAY to avoid jitter
Browse files Browse the repository at this point in the history
  • Loading branch information
temoto committed Nov 2, 2015
1 parent 9abd22f commit ce8f75f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions printrun/printcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def connect(self, port = None, baud = None, dtr=None):
if not is_serial:
self.printer_tcp = socket.socket(socket.AF_INET,
socket.SOCK_STREAM)
self.printer_tcp.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
self.timeout = 0.25
self.printer_tcp.settimeout(1.0)
try:
Expand Down

0 comments on commit ce8f75f

Please sign in to comment.