🔌Simple WebSocket Server
:websocket: Simple WebSocket Server
This asset offers a simple method for establishing a WebSocket server within Unity, enabling real-time data exchange with other tools.
🏁 How can this asset help me?
Ensuring real-time information exchange between Unity and another program can be complex. Yet, this asset offers a swift and uncomplicated method to enable bidirectional information exchange over websockets.⭐ Event Based
The server utilizes an event-based system to register all route handlers. Simply drag and drop the desired endpoint handler into the server.🧭 Simple Routing
Creating endpoint paths has been made incredibly straightforward! Each endpoint handler can have its designated path, enabling the inclusion of multiple endpoint handlers per WebSocket server.👥 Client Seperation
Every endpoint handler has the capability to interact with particular clients and can also broadcast messages to all clients at once. By assigning a unique ID to each client, a distinct separation in communication with the clients can be established.⚡ Fast
The server's speed is impressive, achieved solely through native implementations. External libraries were intentionally omitted during development to guarantee this exceptional performance.📚 Multiple Instances
The event-based architecture enables the concurrent operation of numerous servers across various ports simultaneously.🏠 Listening Addresse
Within the Listening Addresse section, you can not only choose the port for listening but also determine the server's accessibility, whether it's available on the home network or restricted to the same computer.⬇️ Get it now
Simple WebSocket Server | Utilities Tools | Unity Asset Store
Use the Simple WebSocket Server from Shadow Grove Games on your next project. Find this utility tool & more on the Unity Asset Store.
8 Replies
Sounds good!
thx
For my current project I do it with JS directly though, as WebGL is the only target platform. But I'll keep it in mind for future projects :D
How do you host a websocket server with webgl 👀?
I only ask because webgl does not allow listening to ports
Yeah sorry, that was a bit misleading 😂
The client is done via WebGL modules in the browser
The server is running separately from unity
Ahhh ok 😅
So yeah, if you need a websocket server in unity, something like your assets seems the only way
Websocket Clients in unity should be really simple to implement with default C#, right?
Yes, it is compatible with any websocket client implementation and there are a lot of libs out there.
Version 1.1 Changelog
- Add a new example for the websocket client - Implement public methods in the websocket server to start/stop the server - Add an auto-start toggle to the websocket server - Fix code style and clean up codehttps://assetstore.unity.com/packages/tools/utilities/simple-websocket-server-260199?utm_source=discord#releases :websocket: Simple Websocket Server 50% off The Asset Simple WebSocket Server is in the latest top assets sale and gets 50% off. 🛒 Get it now: https://assetstore.unity.com/packages/tools/utilities/simple-websocket-server-260199 Version 1.2 Changelog
- Improve performance and latency for message handling - Add new latency example - Add client ip address to user information - Unbind events on server shutdown - Cleanup codehttps://assetstore.unity.com/packages/tools/utilities/simple-websocket-server-260199?utm_source=discord Version 1.3 Changelog
- Fixed a bug that prevented multiple messages in a dataframe from being processed. - Fixed a bug that prevented processing messages sent immediately after opening a websocket. - Improve handling of large messages - Fix build issuehttps://assetstore.unity.com/packages/tools/utilities/simple-websocket-server-260199?utm_source=discord Version 1.4 Changelog
- Add missing client IP address in disconnect event - Fixed a small bug that occurred when processing multiple messages in a dataframe.https://assetstore.unity.com/packages/tools/utilities/simple-websocket-server-260199?utm_source=discord