Skip to content

mikerochip/server-websocket-tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Server Test Project for Unity WebSocket Package

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.

Setup

  1. Clone this repo
  2. You have to find the version of .NET that this project is on currently
  3. Open the WebSocketEchoServer.csproj file in a text editor
  4. Look for the <TargetFramework> element to find the .NET version
  5. Go to https://dotnet.microsoft.com/en-us/download/dotnet and download the SDK for that version
  6. Install the SDK
  7. Open a terminal
  8. Run dotnet dev-certs https --trust
    • If you're having trouble with this step, try this doc
  9. 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
  10. When you run the server, note the line that says Now listening on: http://localhost:5182
  11. You'll want to use that for your websocket's server url, but swap http for ws e.g. ws://localhost:5182

Releases

No releases published

Packages

No packages published

Languages