This repo contains a test server for my Unity WebSocket client package
The test server is written in C# using ASP.NET. This should work on Windows, Mac, and Linux. Yes, C# and ASP.NET are cross platform. It's been like that since 2016. It's really nice.
- Clone this repo
- You have to find the version of .NET that this project is on currently
- Open the WebSocketEchoServer.csproj file in a text editor
- Look for the
<TargetFramework>
element to find the .NET version - Go to https://dotnet.microsoft.com/en-us/download/dotnet and download the SDK for that version
- Install the SDK
- Open a terminal
- Run
dotnet dev-certs https --trust
- If you're having trouble with this step, try this doc
- Now run the server
- You can open the
WebSocketEchoServer.csproj
in any C# IDE and run it - You can also do
dotnet run
in a terminal after changing directories to the.csproj
directory
- You can open the
- When you run the server, note the line that says
Now listening on: http://localhost:5182
- You'll want to use that for your websocket's server url, but swap
http
forws
e.g.ws://localhost:5182