sta / sta/websocket-sharp

Unity 4.3.1f1 and websocket-sharp freeze Unity Editor.

Open
#35 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Self build websocket-sharp, and add dll (Assets/Plugins). And Unity Editor freeze.

using UnityEngine;
using System.Collections;

using System;
using System.Threading;
using WebSocketSharp;

public class NewBehaviourScript : MonoBehaviour {

void Start () {

    using (WebSocket ws = new WebSocket ("ws://localhost:8080")) {

        print ("Open socket: "+ ws.ReadyState);

        print ("Websocket Alive: "+ ws.IsAlive);


        ws.OnMessage += (sender, e) => {
            print("From srv:" + e.Data);
        };

        ws.OnOpen += (sender, e) => {

            print("WebSocket-> Open:");

            print ("Open socket-> OnOpen: "+ ws.ReadyState);

        };
        ws.OnError += (sender, e) => {
            print("WebSocket-> Error:"+ e.Message);

            print ("Open socket-> OnError: "+ ws.ReadyState);
        };

        ws.OnClose += (sender, e) => {
            print("WebSocket-> Close-code:"+ e.Code);
            print("WebSocket-> Close-reason:"+ e.Reason);

            print ("Open socket-> OnClose: "+ ws.ReadyState);
        };

        ws.Connect ();
    }

}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the freeze with Unity 4.3.1f1, the self-built websocket-sharp DLL in Assets/Plugins, and the supplied MonoBehaviour example. No source file or test is named, so first trace the Connect and disposal sequence in this reproduction; done means identifying the cause and verifying that the Unity Editor no longer freezes.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.