Skip to content

Commit

Permalink
Use WebSocketStdlibAdapter as the default socket adapter. (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Gehorsam authored Feb 22, 2024
1 parent 220e123 commit cb52f14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Packages/Nakama/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p

### [Unreleased]

### Changed
- Default socket adapter changed from `WebSocketAdapter` to `WebSocketStdlibAdapter`. This was done to utilize the native .NET Websocket library for improved stability and maintenance.

## [3.10.1] - 2023-12-12

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Packages/Nakama/Runtime/ClientExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static ISocket NewSocket(this IClient client, bool useMainThread = false,
#if UNITY_WEBGL && !UNITY_EDITOR
threadedAdapter = new JsWebSocketAdapter();
#else
threadedAdapter = defaultAdapter ?? new WebSocketAdapter();
threadedAdapter = defaultAdapter ?? new WebSocketStdlibAdapter();
#endif

var adapter = useMainThread ? UnitySocket.Create(threadedAdapter) : threadedAdapter;
Expand Down

0 comments on commit cb52f14

Please sign in to comment.