0

I'm trying to send an uint-Array to a Server. But i don't know how to realise it. The uint[] looks like this:

[0,0,0,0, 255,255,255, 255,255,255]

I'am working with the stream.Write methode but this methode is only working with a byte[] how can i convert a uint8[] to a byte[] or is there any chance to send a uint8[] over tcp? The problem is i can't access the source code on the server nor change it.

EDIT: This is what i'm typing to the Chrome Console and it's working:

ws = new WebSocket("ws://localhost:7890")

to open the websocket connection and the rest: enter image description here

Thanks a lot

1 Answers1

0

You could try to convert the array. Something like: var byteArray = uintArray.Select(item=>(Byte)item).ToArray();

Luci
  • 1,278
  • 9
  • 17