ianharrigan / hxWebSockets

hxWebSockets - websockets for all haxe platforms
https://github.com/ianharrigan/hxWebSockets
81 stars 18 forks source link

support IOS #14

Closed sonygod closed 4 years ago

sonygod commented 4 years ago

when target to ios from unity ,it's seem not work .

I'm trying to debug and found out why not work .

mark.

gepatto commented 4 years ago

I'm having trouble with ios (13) too. I also tried using the daltoniam/Starscream library and tried just using sys.net.socket in Haxe 4. Somehow a socket on ios seems to refuse to be connected with the Haxe Socket. It always throws error 61 on the ios side. So it seems the problem is not in this hxWebsocketSockets library but at a lower level.

sonygod commented 4 years ago

well ,I'll report here if I found the solutions.

sonygod commented 4 years ago

@gepatto

I found here is wrong

    var ws:WebSocket = Thread.readMessage(true);
sonygod commented 4 years ago

@ianharrigan any idea?

sonygod commented 4 years ago

image

fixed by use MainLoop.addThread to replace Thread.readMessage

@ianharrigan @gepatto

ianharrigan commented 4 years ago

OK, great - can you get the latest from git and make sure it works? If it does, then ill make a haxelib release.

Thanks! Ian

ianharrigan commented 4 years ago

This is the commit fyi: https://github.com/ianharrigan/hxWebSockets/commit/57df647e8e3861b9d05e049fb14e9ffc2beaac16

sonygod commented 4 years ago

sure