def send(channel, *args): buf = marshall(args) value = htonl(len(buf)) size = struct.pack("L", value) channel.send(size) channel.send(buf)