[fixed] Cannot use the websocket network connection

It Cannot use the websocket network connection at Android platform.I used websocket to connect ws://echo.websocket.org.It can be connected to in IOS, but in Android.I printed the log in WebSocket::onSocketCallback method.

the log in IOS is

Cocos2d: [WebSocket::init] *host: echo.websocket.org,*port: 80, *path: /
Cocos2d: socket callback for 21 reason
Cocos2d: socket callback for 23 reason
Cocos2d: socket callback for 20 reason
Cocos2d: socket callback for 18 reason
Cocos2d: socket callback for 2 reason
Cocos2d: socket callback for 3 reason
Cocos2d: socket callback for 25 reason
Cocos2d: JS: 连接成功
the log in Android is
08-01 11:42:30.146: D/cocos2d-x debug info:*host: echo.websocket.org, *port: 80,*path: /
08-01 11:42:30.166: D/cocos2d-x debug info(813): socket callback for 21 reason

It was blocked after callback for 21 reason.

The cocos2d-x version is 3.0 alpha

Was your android device connected to internet?

James Chen wrote:

Was your android device connected to internet?

Yes,It was ran in android simulator.And I am sure the simulator connected to internet.

I haven’t tested it on android simulator. Could you test it on android device to see whether it happens too?

James Chen wrote:

I haven’t tested it on android simulator. Could you test it on android device to see whether it happens too?

I tested it on Samsung I9000.There is the same problem.

James Chen wrote:

I haven’t tested it on android simulator. Could you test it on android device to see whether it happens too?

Hi,Sorry,it is my problem.I didn`t add internet permission.

OK, so could you modify the title of this thread to fixed .
garfield ho wrote:

James Chen wrote:
> I haven’t tested it on android simulator. Could you test it on android device to see whether it happens too?
>
Hi,Sorry,it is my problem.I didn`t add internet permission.

James Chen wrote:

OK, so could you modify the title of this thread to fixed .
garfield ho wrote:
> James Chen wrote:
> > I haven’t tested it on android simulator. Could you test it on android device to see whether it happens too?
>
> Hi,Sorry,it is my problem.I didn`t add internet permission.

Of course, I have modified the title.