From f394dd49adec6740a945760c55e0e9b8882d2845 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Wed, 3 Jul 2013 07:15:28 -0400 Subject: [PATCH] One send() call, if possible. --- beacon.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beacon.py b/beacon.py index 96246fc..a73a357 100644 --- a/beacon.py +++ b/beacon.py @@ -182,8 +182,7 @@ class Beacon: block = block[sent:] def send_packet(self, sock, packet): - self.send_bytes(sock, struct.pack('!I', len(packet))) - self.send_bytes(sock, packet) + self.send_bytes(sock, struct.pack('!I', len(packet)) + packet) def listen(self): """ For the direct-connect, TCP-style beacon """ -- 2.11.4.GIT