Giter VIP home page Giter VIP logo

unitysocketio-websocketsharp's People

Contributors

kaistseo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unitysocketio-websocketsharp's Issues

Error: "destroying non-socket.io upgrade"

Hey,

When using socket.io at the back-end, i receive this error whenever i try to connect, and afterwards it closes the connection.

DEBUG - "destroying non-socket.io upgrade"

Build error with WebPlayer

Hi !

Tks a lot for this library. I encounter those errors when I switch my project build settings to "webplayer" :

Assets/SocketIO/websocket-sharp/Ext.cs(88,81): error CS1729: The type System.IO.Compression.DeflateStream' does not contain a constructor that takes 3' arguments

Assets/SocketIO/websocket-sharp/Ext.cs(125,83): error CS1729: The type System.IO.Compression.DeflateStream' does not contain a constructor that takes 3' arguments

Assets/SocketIO/websocket-sharp/Net/HttpConnection.cs(115,43): error CS1061: Type WebSocketSharp.Net.Security.SslStream' does not contain a definition for AuthenticateAsServer' and no extension method AuthenticateAsServer' of type WebSocketSharp.Net.Security.SslStream' could be found (are you missing a using directive or an assembly reference?)

I have no problem with Android, IOS, windows, or windows Phone.

I don't have any error in Visual Studio, and a quick checking of the DeflateStream class shows a constructor with 3 arguments ...

I suppose it's because of System.IO not being available with the webplayer. But in this case, does that mean this library does not work with the webplayer at all ?

Socket.io 1.0 Upgrade

Hi, I have problems using your library with socket.io 1.0, you have plans to upgrade your client in order to work with socket.io 1.0?.

Thanks.

transport: xhr-polling

Is there a way to use xhr-polling as transport mechanism instead of websocket? My server identifies the client as using websocket.

The call is ambiguous between the following methods or properties

Hi how can i fixed the error below?

Assets/UnitySocketIO-WebSocketSharp-master/SocketIO/websocket-sharp/AuthenticationResponse.cs(301,16): error CS0121: The call is ambiguous between the following methods or properties: WebSocketSharp.Ext.IsNullOrEmpty(this string)' andWebSocketSharp.Ext.IsNullOrEmpty(this string)'

Client.Emit does not properly send object[] as multiple arguments.

So, I was trying this out today, and noticed that the issue is it wraps the object[] into another object[]. I noticed that you had already supported it in the JSONEncodedEventMessage via the constructor of JsonEncodedEventMessage(string name, object[] payloads).

However, by trying to just use the Client.Emit it sends the object[] as just an object and thus only calls the JSONEncodedEventMessage(string name, object payload).

To fix this Add the following lines to Client.cs:

public void Emit(string eventName, Object[] payloads) {
this.Emit (eventName, payloads, string.Empty, null);
}

public void Emit(string eventName, Object[] payloads, string endPoint, Action<Object> callback) {
            IMessage msg = null;
            if (!string.IsNullOrEmpty(endPoint) && !endPoint.StartsWith("/"))
                endPoint = "/" + endPoint;
            msg = new EventMessage(eventName, payloads, endPoint, callback);
            if (callback != null)
                this.registrationManager.AddCallBack(msg);

            this.Send(msg);
        }

Then in EventMessage.cs add the following:

public EventMessage(string eventName, object[] payloads, string endpoint, Action<Object> callBack) : this() {
            this.Callback = callBack;
            this.Endpoint = endpoint;

            if (callBack != null)
                this.AckId = EventMessage.NextAckID;

            this.JsonEncodedMessage = new JsonEncodedEventMessage(eventName, payloads);
            this.MessageText = this.Json.ToJsonString();
        }

100% cpu used?

when I run in Unity Editor, and connect to socket.io server, the cpu used percent jump to 100%

Can't Handshake on WebPlayer

so, the library works in Unity for Android and WebPlayer, but when i build a WebPlayer app for chrome, it doesn't work and i only get in the console the message:

socket client error: Error initializing handshake with http://10.0.0.111:3014/

It is intended to work with the WebPlayer or is there a problem?

Not working with https

Hello,

I can't to connect to my server with ws://address.tld or wss://address.tld I figure out, that http://address.tld is working. So this is not a problem.

But I am not able to figure out, how to connect to server with https. I am trying to connect to heroku. With http only it working like a charm but with https (even with specific 443 port) it fails.

So my question is. Does this websocket with https?

Here is log:

socket Error: Error initializing handshake with https://itdrawing.herokuapp.com/
UnityEngine.Debug:Log(Object)
InstantiatePoints:<Start>m__2(Object, ErrorEventArgs) (at Assets/scripts/instantiater/InstantiatePoints.cs:33)
SocketIOClient.Client:OnErrorEvent(Object, ErrorEventArgs)
SocketIOClient.Client:Connect()
InstantiatePoints:Start() (at Assets/scripts/instantiater/InstantiatePoints.cs:35)

Does this actually works in the webplayer?

I cannot get this working in the webplayer. I tried by using the the example script provided. Everything works inside the unity editor (webplayer platform) but once you export it and put it live it stops working.

All I get is Error initializing handshake.

Has anyone used this with success inside the webplayer?

No license included

The original UnitySocketIO and websocketsharp are both under the MIT license but this project does not have a license attached to it. Could you consider licensing this project under the MIT license?

socket.io namespace ("endpoint"?)

Hi.

I need to connect to a socket.io namespace (socket.io 0.9.x)
e.g. using JS client I would connect to http://mysocketioserver:1234/namespace

Is the correct way to do this to pass the string in the Connect() method rather than in the URL?
socket = new SocketIOClient("http://mysocketioserver:1234");
socket.Connect("namespace");

And if so, do I also need to pass it when doing an Emit?
socket.Emit("message", args, "namespace", null)

Normally I Emit a "joinRoom" message after connecting with a UID as the args and then I'm able to receive messages but not sure what I'm doing wrong here. I get the "connect" message but none of the messages I'm expecting after that.

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.