endel / NativeWebSocket

🔌 WebSocket client for Unity - with no external dependencies (WebGL, Native, Android, iOS, UWP)
Other
1.13k stars 155 forks source link

Can i send string and bytearray together? #59

Closed Matt-Finlay closed 2 years ago

Matt-Finlay commented 2 years ago

The API I'm trying to use, wants me to send data in the following manor:

websocket.emit("binaryData", data);

Does NativeWebSockets support this? or can i only sent plain text OR byteArray separately?

Thanks

endel commented 2 years ago

Hi @Matt-Finlay, with raw WebSocket communication you either send arbitrary binary or text messages. Message types as you've described must be implemented on your own. Most higher-level abstractions over WebSocket support this, though. Such as socket.io and Colyseus.