Giter Site home page Giter Site logo

socket.io-unity's Introduction

Metrics

socket.io-unity's People

Contributors

m1ngxu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

socket.io-unity's Issues

NullReferenceException SocketIOUnity.cs:32

hi,
this is a new scene on unity 2019.4.36f1
image

I have 2 scripts on 1 object ( I disabled mine so 1 script on 1 empty object and the error was still generated )

I believe the error is referring to this line

image
which is enum if i'm not wrong and it has been already defined as "Closed" it even says that on the inspector

image

Not sure why it says null

How to disconnect ?

I know this is how we connect

_ = socket.Connect("ws://192.168.178.44:3000");
socket.On("connect", s => Debug.Log(":)"));

But how as a client to close the connection ? , I cant find socket.Disconnect();
Is there is a way for the server to force disconnect a client or a client to voluntarily leave the server ?

how to maintain the connection (Ping-pong/heartbeat)

How to keep the client connected ?
I'm using KyleDulce.SocketIo but it sadly got depreciated, and as soon as I developed deep enough I realized that there is no ping-pong/heartbeeat mechanism, so all clients would disconnected as soon as the time ran out.

could you show me an example to maintain a heart beat ?
I'm using python as the backenet/server, would that be a problem ?

change the SocketState on connection drop

when the server closes the connection I get this error

WebSocketException: The remote party closed the WebSocket connection without completing the close handshake.

but the SocketState remains Open
it would be ideal to Dispose() the connection when getting this specific error, is there a way?

[IMPORTANT!] License Declaration

Please make a License Declaration to MIT so we can use your script freely in commercial uses, otherwise, we wont be able to relay on it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.