Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
# ========================= #
.idea/
_ReSharper.Caches
Utilities.Websockets/ProjectSettings/boot.config
[Ll]ogs
1 change: 1 addition & 0 deletions Utilities.Websockets/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ TextMesh Pro.meta
TextMesh Pro/
UIElementsSchema/
*packages-lock.json
boot.config

# ============ #
# Certificates #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
* if not, it will create them using the getWasmTableEntry function.
* @see https://discussions.unity.com/t/makedyncall-replacing-dyncall-in-unity-6/1543088
*/
if (!Module["ENVIRONMENT_IS_PTHREAD"]) {
if (Module["ENVIRONMENT_IS_PTHREAD"]) {
// If we are in a pthread, we need to initialize the dynCalls immediately
_WebSocket_initDynCalls();
} else {
Module['preRun'].push(function () {
initDynCalls();
_WebSocket_initDynCalls();
});
} else {
// If we are in a pthread, we need to initialize the dynCalls immediately
initDynCalls();
}

function initDynCalls() {
function _WebSocket_initDynCalls() {
if (typeof getWasmTableEntry !== "undefined") {
Module.dynCall_vi = Module.dynCall_vi || function (cb, arg1) {
return getWasmTableEntry(cb)(arg1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
uiDocument: {fileID: 162690822}
address: wss://echo.websocket.events
address: wss://echo.websocket.org
--- !u!1 &531589459
GameObject:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ namespace Utilities.WebSockets.Tests
{
internal class TestFixture_01
{
private const string EchoServerAddress = "wss://echo.websocket.org";

[Test]
public async Task Test_01_SimpleEcho()
{
var openTcs = new TaskCompletionSource<bool>();
var messageTcs = new TaskCompletionSource<bool>();
var closeTcs = new TaskCompletionSource<bool>();
using var socket = new WebSocket("wss://echo.websocket.events");
using var socket = new WebSocket(EchoServerAddress);
socket.OnOpen += Socket_OnOpen;
socket.OnMessage += Socket_OnMessage;
socket.OnError += Socket_OnError;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Utilities.WebSockets",
"description": "A simple websocket package for Unity (UPM)",
"keywords": [],
"version": "1.0.6",
"version": "1.1.0",
"unity": "2021.3",
"documentationUrl": "https://github.com/RageAgainstThePixel/com.utilities.websockets#documentation",
"changelogUrl": "https://github.com/RageAgainstThePixel/com.utilities.websockets/releases",
Expand Down
6 changes: 3 additions & 3 deletions Utilities.Websockets/Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"dependencies": {
"com.unity.ide.rider": "3.0.36",
"com.unity.ide.visualstudio": "2.0.23",
"com.unity.ide.rider": "3.0.38",
"com.unity.ide.visualstudio": "2.0.25",
"com.unity.test-framework": "1.1.33",
"com.utilities.buildpipeline": "1.7.6",
"com.utilities.buildpipeline": "1.8.0",
"com.unity.modules.uielements": "1.0.0"
},
"scopedRegistries": [
Expand Down
4 changes: 2 additions & 2 deletions Utilities.Websockets/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 2021.3.45f1
m_EditorVersionWithRevision: 2021.3.45f1 (0da89fac8e79)
m_EditorVersion: 2021.3.45f2
m_EditorVersionWithRevision: 2021.3.45f2 (88f88f591b2e)
Loading