Supporting IPv6-only Networks

Supporting IPv6-only Networks
0

#122

我使用的是quick cocos2d-lua 3.2,替换了curl和wesockets文件,替换了websocket.h和cpp文件。连接服务器可以收到onOpen消息,但是在下一个接口消息时就会收到LWS_CALLBACK_CLOSED此类型的消息,连接断开

Blockquote
[LUA-print] 2017-08-09 15:15:00[INFO]进行了消息注册,eventName= push@task
[LUA-print] 2017-08-09 15:15:00[INFO]进行了消息注册,eventName= push@pay
WebSocket (04FE4500) onConnectionError …
Ready state is closing or was closed, code=2, quit websocket thread!
NOTICE: lws_context_destroy

WebSocket (04FE4500) onConnectionClosed …
WebSocket thread exit, helper instance: 050541B8
[LUA-print] 2017-08-09 15:15:02[ERROR]websocket error!
[LUA-print] 2017-08-09 15:15:02[INFO]websocket close!===========================
==
[WebSocket::init] _host: 192.168.0.118, _port: 8957, _path: /websocket
WebSocket thread start, helper instance: 052C1078
NOTICE: Initial logging level 967

NOTICE: Libwebsockets version: 1.6.0 unknown-build-hash

NOTICE: IPV6 not compiled in

NOTICE: libev support not compiled in

[LUA-print] 2017-08-09 15:15:05[INFO]after create websocket, address: ws://192.1
68.0.118:8957/websocket
NOTICE: mem: per-conn: 280 bytes + protocol rx buf

[LUA-print] 2017-08-09 15:15:05[INFO]succ to websocket open, host=192.168.0.118:
8957, address=ws://192.168.0.118:8957/websocket
[LUA-print] 2017-08-09 15:15:13[INFO]-----------------播放音效----- music/so
und/Button.mp3
[LUA-print] 2017-08-09 15:15:13[INFO]-------------------userName:123, password:1
23
[LUA-print] 2017-08-09 15:15:13[INFO]发送的actionName:user@login, userName=123&
password=123
Safely done, msg(1)!
msg(1) append: 0 + 66 = 66
msg(1) was totally sent!
-----------------------------------------------------------
WebSocket (04FE45B0) onConnectionClosed …
NOTICE: lws_context_destroy

onConnectionClosed: WebSocket (04FE45B0) was closed, no need to close it again!
WebSocket thread exit, helper instance: 052C1078
[LUA-print] 2017-08-09 15:15:13[INFO]websocket close!===========================
==
[WebSocket::init] _host: 192.168.0.118, _port: 8957, _path: /websocket
WebSocket thread start, helper instance: 05054638
NOTICE: Initial logging level 967