endel / NativeWebSocket

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

Added Options for WebSocket. #63

Open selzler opened 2 years ago

selzler commented 2 years ago

Added WebSocketOptions class to be able to add more ClientWebSocketOptions options like KeepAliveInterval and Credentials, and a little refactoring in WebSocket.

XtroTheArctic commented 2 years ago

Why wrap constructor parameters into an options object?

selzler commented 2 years ago

Why wrap constructor parameters into an options object?

since ClientWebSocketOptions has a lot of options, I would have to add a constructor for each option. so with an options object I can add options without having to mess with the original websocket.cs.

ClientWebSocketOptions Classe https://docs.microsoft.com/en-us/dotnet/api/system.net.websockets.clientwebsocketoptions?view=net-6.0

XtroTheArctic commented 2 years ago

Thank you for the info 👍