pyCraft/networking/PacketSenderManager.py
Ammar Askar a3a442db3a Moved networking stuff to network package
Fixed message duping bug
2012-07-18 15:45:25 +01:00

7 lines
179 B
Python

import socket
import struct
def send03(socket, message):
socket.send("\x03")
socket.send(struct.pack('!h', message.__len__()))
socket.send(message.encode("utf-16be"))