capacitor-udp
capacitor-udp copied to clipboard
UDP Send ,, what is buffer format requirement?
doc says UdpPlugin.send({ socketId: yourSocketId, address: targetAddress, port: 6000, buffer: bufferString})
as string should be ok.. but my receiver received garbled string.
debug info from android studio on device.
UdpPlugin, methodName: send, methodData: {"socketId":2,"address":"192.168.2.255","port":8100,"buffer":"DISCOVER_MIRRORSERVER_REQUEST:39813"}
do I need to put this into arrayBuffer and then use your worker class? if it needs to be Base64 of the string, I can do that too.. (already have function that turns string into arrayBuffer)
ok, needs to be base64. javascript. btoa() does that.. my receiver now gets good data