I want to send byte arrays using the OSC plugin, but with a blueprint like the one below, the data received at the server is not what I expect.
{0, 1, 2, 3, 1, 2, 3, 4}
is received instead of {0, 1, 2, 3, 4, 5, 6, 7}
.
The same problem is occured in equivalent C++ code.
Please tell me how to fix this problem.
Blueprint(Client)
Python(Server)
import argparse
from pythonosc.dispatcher import Dispatcher
from pythonosc import osc_server
def print_bytes_handler(unused_addr, args, bytes):
print("[{0}] (len: {2}) ~ {1}".format(args[0], ' '.join(map(str, bytes)), len(bytes)))
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--ip",
default="127.0.0.1", help="The ip to listen on")
parser.add_argument("--port",
type=int, default=7000, help="The port to listen on")
args = parser.parse_args()
dispatcher = Dispatcher()
dispatcher.map("/test1", print_bytes_handler, "TEST1")
server = osc_server.ThreadingOSCUDPServer(
(args.ip, args.port), dispatcher)
print("Serving on {}".format(server.server_address))
server.serve_forever()
environment:
Windows10, UnrealEngine5.1.1