Skip to content

Commit

Permalink
Merge pull request #110 from warner/109-set-tcp_nodelay-to-reduce-lat…
Browse files Browse the repository at this point in the history
…enacy

Set TCP_NODELAY for reduced latency
  • Loading branch information
meejah authored Sep 12, 2024
2 parents 962510c + 11286c1 commit c93d980
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/foolscap/banana.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import struct, time

from twisted.internet import protocol, defer, reactor
from twisted.internet.interfaces import ITCPTransport
from twisted.python.failure import Failure
from twisted.python import log

Expand Down Expand Up @@ -106,6 +107,8 @@ def populateVocabTable(self, vocabStrings):
def connectionMade(self):
if self.debugSend:
print("Banana.connectionMade")
if ITCPTransport.providedBy(self.transport):
self.transport.setTcpNoDelay(True)
self.initSlicer()
self.initUnslicer()
if self.keepaliveTimeout is not None:
Expand Down

0 comments on commit c93d980

Please sign in to comment.