Problem connecting to websocket server on local network wit an external ip 192.168.0.xx
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp, unity
- Domain
- game-dev, networking
Research direction
Start with Assets/Scripts/Clients/CortexClient.cs:56 and reproduce the TLS handshake using the LAN address instead of localhost in the Unity editor. Compare the failing Unity connection with the working wscat connection and inspect the NativeWebSocket package at WebSocket/WebSocket.cs:478. Done means the Unity editor and a compiled VR device can connect to the stated local websocket server over its LAN address.
Written by the indexing model from the issue text.
Description
PROBLEM
Im trying to connect to a websocket server hosted on my lan at wss://192.168.0.42:6868. It doesn't require authorization.
The websocket client fails the TLS handshake if i use an external ip like wss://192.168.0.xxx:6868 but it works fine if i use wss://localhost:6868
DETAILS
I can connect via the the TUI app wscat, but when I try to connect via the Unity editor I get the following error:
Connection Error! Please double check your URL and ensure the cortex API is runningURL: wss://192.168.0.42:6868 Error: Unable to connect to the remote server
UnityEngine.Debug:LogError (object)
CortexClient:<Start>b__13_1 (string) (at Assets/Scripts/Clients/CortexClient.cs:56)
NativeWebSocket.WebSocket/<Connect>d__27:MoveNext () (at Library/PackageCache/com.endel.nativewebsocket@c5101c0776/WebSocket/WebSocket.cs:478)
UnityEngine.UnitySynchronizationContext:ExecuteTasks () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
Ideally I'd like to connect to the same local web socketserver over the local network on the Unity editor, and via a compiled device in VR.
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from endel/NativeWebSocket
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
endel/NativeWebSocket#107 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
endel/NativeWebSocket#102 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
endel/NativeWebSocket#101 · 6 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
endel/NativeWebSocket#95 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
endel/NativeWebSocket#94 · 2 comments ·
All issues in endel/NativeWebSocket
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·