求助socket.io 无法连接啦!helper me !!!

都安装完成了,服务端已经启动监听了。 但是客户端不知道怎么样也连接不上!

--------------------------------------------- 下面是客户端输出的提示---------------------------------------------
2018-03-03T05:43:04.499Z - normal: Load ~/.CocosCreator/settings.json
2018-03-03T05:43:04.512Z - normal: checking language setting…
2018-03-03T05:43:04.512Z - normal: Language: zh
2018-03-03T05:43:09.290Z - success: protocol editor-framework registered
2018-03-03T05:43:09.290Z - success: protocol app registered
2018-03-03T05:43:09.290Z - success: protocol theme registered
2018-03-03T05:43:09.290Z - success: protocol packages registered
2018-03-03T05:43:09.290Z - success: protocol unpack registerred
2018-03-03T05:43:09.290Z - success: protocol disable-commonjs registerred
2018-03-03T05:43:09.532Z - normal: connected!
2018-03-03T05:43:09.534Z - normal: Check project D:\GitHub\doudizhu_os\doudizhu_client
2018-03-03T05:43:09.537Z - normal: Initializing Cocos2d
2018-03-03T05:43:10.376Z - normal: Initializing Asset Database
2018-03-03T05:43:10.489Z - success: protocol uuid registerred
2018-03-03T05:43:10.490Z - success: protocol db registerred
2018-03-03T05:43:10.490Z - success: protocol thumbnail registerred
2018-03-03T05:43:10.491Z - normal: Loading editor/builtin packages
2018-03-03T05:43:10.568Z - success: anysdk loaded
2018-03-03T05:43:10.773Z - success: assets loaded
2018-03-03T05:43:10.777Z - success: builder loaded
2018-03-03T05:43:10.780Z - success: cocos-analytics loaded
2018-03-03T05:43:10.785Z - success: console loaded
2018-03-03T05:43:10.791Z - success: hierarchy loaded
2018-03-03T05:43:10.803Z - success: inspector loaded
2018-03-03T05:43:10.804Z - success: keystore loaded
2018-03-03T05:43:10.808Z - success: node-library loaded
2018-03-03T05:43:10.811Z - success: package-asset loaded
2018-03-03T05:43:10.814Z - success: preferences loaded
2018-03-03T05:43:10.816Z - success: project-exporter loaded
2018-03-03T05:43:10.843Z - success: project-importer loaded
2018-03-03T05:43:10.846Z - success: project-settings loaded
2018-03-03T05:43:10.857Z - success: ui-kit loaded
2018-03-03T05:43:10.860Z - success: ui-grid loaded
2018-03-03T05:43:10.865Z - success: scene loaded
2018-03-03T05:43:10.867Z - success: sprite-editor loaded
2018-03-03T05:43:10.871Z - success: store loaded
2018-03-03T05:43:10.878Z - success: timeline loaded
2018-03-03T05:43:10.879Z - normal: Loading builtin packages
2018-03-03T05:43:10.882Z - success: asset-db-debugger loaded
2018-03-03T05:43:10.884Z - success: code-editor loaded
2018-03-03T05:43:10.889Z - success: color-picker loaded
2018-03-03T05:43:10.892Z - success: package-manager loaded
2018-03-03T05:43:10.898Z - success: sdkbox loaded
2018-03-03T05:43:10.903Z - success: tester loaded
2018-03-03T05:43:10.906Z - success: ui-kit-preview-extra loaded
2018-03-03T05:43:10.908Z - success: ui-kit-preview loaded
2018-03-03T05:43:10.917Z - success: ui-tree loaded
2018-03-03T05:43:13.256Z - normal: Initializing project D:\GitHub\doudizhu_os\doudizhu_client
2018-03-03T05:43:13.263Z - normal: Loading packages
2018-03-03T05:43:13.269Z - normal: Watching packages
2018-03-03T05:43:13.318Z - normal: Run Application
2018-03-03T05:43:17.540Z - success: preview server running at http://localhost:7456
2018-03-03T05:43:30.327Z - normal: 1.8.1
2018-03-03T05:49:47.482Z - failed: load script [D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js] failed : TypeError: Cannot read property ‘Blob’ of undefined
at Object. (D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js:318:37)
at Object.n (D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js:320:8)
at e (D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js:14:99)
at Object.t.exports (D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js:256:13)
at e (D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js:14:99)
at Object. (D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js:32:13)
at e (D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js:14:99)
at D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js:15:52
at D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js:16:4
at n (D:\GitHub\doudizhu_os\doudizhu_client\temp\quick-scripts\assets\scripts\lib\socket.io.js:10:179)
2018-03-03T05:51:40.098Z - normal: Simulator: SCREEN DPI = 96, SCREEN SCALE = 1.00

2018-03-03T05:51:40.100Z - normal: Simulator: WORKAREA WIDTH 1432.00, HEIGHT 810.00

2018-03-03T05:51:40.100Z - normal: Simulator: FRAME SCALE = 1.00

2018-03-03T05:51:41.167Z - normal: Simulator: Ready for GLSL

2018-03-03T05:51:41.167Z - normal: Simulator: Ready for OpenGL 2.0

2018-03-03T05:51:41.230Z - normal: Simulator:

2018-03-03T05:51:41.230Z - normal: Simulator: {

2018-03-03T05:51:41.231Z - normal: Simulator: gl.version: 4.2.11399 Compatibility Profile Context

2018-03-03T05:51:41.231Z - normal: Simulator: gl.supports_NPOT: true

2018-03-03T05:51:41.232Z - normal: Simulator: cocos2d.x.version: 1.7.0

2018-03-03T05:51:41.233Z - normal: Simulator: cocos2d.x.compiled_with_profiler: false

2018-03-03T05:51:41.233Z - normal: Simulator: cocos2d.x.build_type: DEBUG

2018-03-03T05:51:41.233Z - normal: Simulator: cocos2d.x.compiled_with_gl_state_cache: true

2018-03-03T05:51:41.233Z - normal: Simulator: gl.max_texture_size: 16384

2018-03-03T05:51:41.234Z - normal: Simulator: gl.supports_OES_packed_depth_stencil: false

2018-03-03T05:51:41.234Z - normal: Simulator: gl.vendor: ATI Technologies Inc.

2018-03-03T05:51:41.234Z - normal: Simulator: gl.renderer: ATI Radeon HD 5700 Series

2018-03-03T05:51:41.234Z - normal: Simulator: gl.max_texture_units: 32

2018-03-03T05:51:41.234Z - normal: Simulator: gl.supports_ETC1: false

2018-03-03T05:51:41.234Z - normal: Simulator: gl.supports_PVRTC: false

2018-03-03T05:51:41.235Z - normal: Simulator: gl.supports_BGRA8888: false

2018-03-03T05:51:41.235Z - normal: Simulator: gl.supports_discard_framebuffer: false

2018-03-03T05:51:41.235Z - normal: Simulator: gl.supports_vertex_array_object: true

2018-03-03T05:51:41.235Z - normal: Simulator: gl.supports_OES_map_buffer: false

2018-03-03T05:51:41.235Z - normal: Simulator: gl.supports_OES_depth24: false

2018-03-03T05:51:41.235Z - normal: Simulator: }

2018-03-03T05:51:41.236Z - normal: Simulator:

2018-03-03T05:51:41.236Z - normal: Simulator:

2018-03-03T05:51:41.236Z - normal: Simulator: cocos2d: warning, Director::setProjection() failed because size is 0

2018-03-03T05:51:41.289Z - normal: Simulator: Project Config:

2018-03-03T05:51:41.290Z - normal: Simulator: project dir: F:\CocosCreator\resources\cocos2d-x\simulator\win32\

2018-03-03T05:51:41.290Z - normal: Simulator: writable path: $(PROJDIR)\

2018-03-03T05:51:41.291Z - normal: Simulator: script file: $(PROJDIR)\main.js

2018-03-03T05:51:41.291Z - normal: Simulator: frame size: 960 x 640

2018-03-03T05:51:41.292Z - normal: Simulator: frame scale: 1.00

2018-03-03T05:51:41.292Z - normal: Simulator: show console: NO

2018-03-03T05:51:41.293Z - normal: Simulator: write debug log: NO ()

2018-03-03T05:51:41.294Z - normal: Simulator: listen:

2018-03-03T05:51:41.295Z - normal: Simulator: debugger: none

2018-03-03T05:51:41.295Z - normal: Simulator: add searching path:

2018-03-03T05:51:41.295Z - normal: Simulator:

2018-03-03T05:51:41.296Z - normal: Simulator:

2018-03-03T05:51:41.296Z - normal: Simulator:

2018-03-03T05:51:41.301Z - normal: Simulator: ------------------------------------------------

2018-03-03T05:51:41.302Z - normal: Simulator: LOAD Js FILE: main.js

2018-03-03T05:51:41.302Z - normal: Simulator: ------------------------------------------------

2018-03-03T05:51:41.598Z - normal: Simulator: D/jswrapper (364): Initializing V8, version: 6.0.286.52

2018-03-03T05:51:43.035Z - normal: Simulator: D/jswrapper (813): libuv version: 1.13.1

2018-03-03T05:51:43.044Z - normal: Simulator: D/jswrapper (112): Debugger listening…, visit [ chrome-devtools://devtools/bundled/inspector.html?v8only=true&ws=0.0.0.0:5086/00010002-0003-4004-8005-000600070008 ] in chrome browser to debug!

2018-03-03T05:51:43.045Z - normal: Simulator: D/jswrapper (115): For help see https://nodejs.org/en/docs/inspector

2018-03-03T05:51:44.914Z - normal: Simulator: D/jswrapper (125): JS: Cocos2d-x-lite v1.7.0

2018-03-03T05:51:46.693Z - normal: Simulator: iShow!

2018-03-03T05:51:46.924Z - normal: Simulator: D/jswrapper (125): JS: InitScene: 1.9389999999998508ms

2018-03-03T05:51:46.925Z - normal: Simulator: D/jswrapper (125): JS: AutoRelease: 0.2669999999998254ms

2018-03-03T05:51:46.926Z - normal: Simulator: D/jswrapper (125): JS: Destroy: 0.250999999999749ms

2018-03-03T05:51:46.927Z - normal: Simulator: D/jswrapper (125): JS: AttachPersist: 0.01999999999998181ms

2018-03-03T05:51:46.938Z - normal: Simulator: D/jswrapper (125): JS: Activate: 5.412000000000262ms

2018-03-03T05:52:02.036Z - normal: Simulator: D/jswrapper (147): XMLHttpRequest (08DA4680) receives DIRECTOR::EVENT_RESET, retain self.

2018-03-03T05:52:02.036Z - normal: Simulator: D/jswrapper (147): XMLHttpRequest (08D74C50) receives DIRECTOR::EVENT_RESET, retain self.

2018-03-03T05:52:02.039Z - normal: Simulator: D/jswrapper (447): ScriptEngine::cleanup begin …

2018-03-03T05:52:02.039Z - normal: Simulator: D/jswrapper (588): GC begin …, (js->native map) size: 30, all objects: 311

2018-03-03T05:52:02.090Z - normal: Simulator: D/jswrapper (535): XMLHttpRequest_finalize, 08DA4680 …

2018-03-03T05:52:02.090Z - normal: Simulator: D/jswrapper (535): XMLHttpRequest_finalize, 08D74C50 …

2018-03-03T05:52:02.136Z - normal: Simulator: D/jswrapper (596): GC end …, (js->native map) size: 22, all objects: 305

2018-03-03T05:52:02.137Z - normal: Simulator: D/jswrapper (588): GC begin …, (js->native map) size: 22, all objects: 305

2018-03-03T05:52:02.186Z - normal: Simulator: D/jswrapper (596): GC end …, (js->native map) size: 22, all objects: 305

2018-03-03T05:52:02.188Z - normal: Simulator: D/jswrapper (588): GC begin …, (js->native map) size: 0, all objects: 0

2018-03-03T05:52:02.224Z - normal: Simulator: D/jswrapper (596): GC end …, (js->native map) size: 0, all objects: 0

2018-03-03T05:52:02.240Z - normal: Simulator: D/jswrapper (510): ScriptEngine::cleanup end …

2018-03-03T05:52:34.350Z - normal: Simulator: SCREEN DPI = 96, SCREEN SCALE = 1.00

2018-03-03T05:52:34.353Z - normal: Simulator: WORKAREA WIDTH 1432.00, HEIGHT 810.00

2018-03-03T05:52:34.354Z - normal: Simulator: FRAME SCALE = 1.00

2018-03-03T05:52:34.762Z - normal: Simulator: Ready for GLSL

2018-03-03T05:52:34.763Z - normal: Simulator: Ready for OpenGL 2.0

2018-03-03T05:52:34.805Z - normal: Simulator:

2018-03-03T05:52:34.806Z - normal: Simulator: {

2018-03-03T05:52:34.806Z - normal: Simulator: gl.version: 4.2.11399 Compatibility Profile Context

2018-03-03T05:52:34.806Z - normal: Simulator: gl.supports_NPOT: true

2018-03-03T05:52:34.807Z - normal: Simulator: cocos2d.x.version: 1.7.0

2018-03-03T05:52:34.807Z - normal: Simulator: cocos2d.x.compiled_with_profiler: false

2018-03-03T05:52:34.807Z - normal: Simulator: cocos2d.x.build_type: DEBUG

2018-03-03T05:52:34.807Z - normal: Simulator: cocos2d.x.compiled_with_gl_state_cache: true

2018-03-03T05:52:34.807Z - normal: Simulator: gl.max_texture_size: 16384

2018-03-03T05:52:34.807Z - normal: Simulator: gl.supports_OES_packed_depth_stencil: false

2018-03-03T05:52:34.808Z - normal: Simulator: gl.vendor: ATI Technologies Inc.

2018-03-03T05:52:34.808Z - normal: Simulator: gl.renderer: ATI Radeon HD 5700 Series

2018-03-03T05:52:34.808Z - normal: Simulator: gl.max_texture_units: 32

2018-03-03T05:52:34.808Z - normal: Simulator: gl.supports_ETC1: false

2018-03-03T05:52:34.808Z - normal: Simulator: gl.supports_PVRTC: false

2018-03-03T05:52:34.808Z - normal: Simulator: gl.supports_BGRA8888: false

2018-03-03T05:52:34.809Z - normal: Simulator: gl.supports_discard_framebuffer: false

2018-03-03T05:52:34.809Z - normal: Simulator: gl.supports_vertex_array_object: true

2018-03-03T05:52:34.809Z - normal: Simulator: gl.supports_OES_map_buffer: false

2018-03-03T05:52:34.809Z - normal: Simulator: gl.supports_OES_depth24: false

2018-03-03T05:52:34.809Z - normal: Simulator: }

2018-03-03T05:52:34.809Z - normal: Simulator:

2018-03-03T05:52:34.810Z - normal: Simulator:

2018-03-03T05:52:34.810Z - normal: Simulator: cocos2d: warning, Director::setProjection() failed because size is 0

2018-03-03T05:52:34.810Z - normal: Simulator: Project Config:

2018-03-03T05:52:34.810Z - normal: Simulator: project dir: F:\CocosCreator\resources\cocos2d-x\simulator\win32\

2018-03-03T05:52:34.810Z - normal: Simulator: writable path: $(PROJDIR)\

2018-03-03T05:52:34.811Z - normal: Simulator: script file: $(PROJDIR)\main.js

2018-03-03T05:52:34.811Z - normal: Simulator: frame size: 960 x 640

2018-03-03T05:52:34.811Z - normal: Simulator: frame scale: 1.00

2018-03-03T05:52:34.811Z - normal: Simulator: show console: NO

2018-03-03T05:52:34.811Z - normal: Simulator: write debug log: NO ()

2018-03-03T05:52:34.811Z - normal: Simulator: listen:

2018-03-03T05:52:34.812Z - normal: Simulator: debugger: none

2018-03-03T05:52:34.812Z - normal: Simulator: add searching path:

2018-03-03T05:52:34.812Z - normal: Simulator:

2018-03-03T05:52:34.812Z - normal: Simulator:

2018-03-03T05:52:34.812Z - normal: Simulator:

2018-03-03T05:52:34.812Z - normal: Simulator: ------------------------------------------------

2018-03-03T05:52:34.813Z - normal: Simulator: LOAD Js FILE: main.js

2018-03-03T05:52:34.813Z - normal: Simulator: ------------------------------------------------

2018-03-03T05:52:34.826Z - normal: Simulator: D/jswrapper (364): Initializing V8, version: 6.0.286.52

2018-03-03T05:52:35.327Z - normal: Simulator: D/jswrapper (813): libuv version: 1.13.1

2018-03-03T05:52:35.330Z - normal: Simulator: D/jswrapper (112): Debugger listening…, visit [ chrome-devtools://devtools/bundled/inspector.html?v8only=true&ws=0.0.0.0:5086/00010002-0003-4004-8005-000600070008 ] in chrome browser to debug!

2018-03-03T05:52:35.330Z - normal: Simulator: D/jswrapper (115): For help see https://nodejs.org/en/docs/inspector

2018-03-03T05:52:35.849Z - normal: Simulator: D/jswrapper (125): JS: Cocos2d-x-lite v1.7.0

2018-03-03T05:52:36.249Z - normal: Simulator: iShow!

2018-03-03T05:52:36.387Z - normal: Simulator: D/jswrapper (125): JS: InitScene: 1.6649999999999636ms

2018-03-03T05:52:36.388Z - normal: Simulator: D/jswrapper (125): JS: AutoRelease: 0.2739999999998872ms

2018-03-03T05:52:36.388Z - normal: Simulator: D/jswrapper (125): JS: Destroy: 0.21800000000007458ms

2018-03-03T05:52:36.390Z - normal: Simulator: D/jswrapper (125): JS: AttachPersist: 0.016999999999825377ms

2018-03-03T05:52:36.402Z - normal: Simulator: D/jswrapper (125): JS: Activate: 3.798999999999978ms

2018-03-03T05:52:45.139Z - normal: Simulator: D/jswrapper (147): XMLHttpRequest (082D7968) receives DIRECTOR::EVENT_RESET, retain self.

2018-03-03T05:52:45.140Z - normal: Simulator: D/jswrapper (147): XMLHttpRequest (0830EC10) receives DIRECTOR::EVENT_RESET, retain self.

2018-03-03T05:52:45.142Z - normal: Simulator: D/jswrapper (447): ScriptEngine::cleanup begin …

2018-03-03T05:52:45.143Z - normal: Simulator: D/jswrapper (588): GC begin …, (js->native map) size: 28, all objects: 309

2018-03-03T05:52:45.156Z - normal: Simulator: D/jswrapper (535): XMLHttpRequest_finalize, 082D7968 …

2018-03-03T05:52:45.158Z - normal: Simulator: D/jswrapper (535): XMLHttpRequest_finalize, 0830EC10 …

2018-03-03T05:52:45.224Z - normal: Simulator: D/jswrapper (596): GC end …, (js->native map) size: 22, all objects: 305

2018-03-03T05:52:45.226Z - normal: Simulator: D/jswrapper (588): GC begin …, (js->native map) size: 22, all objects: 305

2018-03-03T05:52:45.273Z - normal: Simulator: D/jswrapper (596): GC end …, (js->native map) size: 22, all objects: 305

2018-03-03T05:52:45.279Z - normal: Simulator: D/jswrapper (588): GC begin …, (js->native map) size: 0, all objects: 0

2018-03-03T05:52:45.361Z - normal: Simulator: D/jswrapper (596): GC end …, (js->native map) size: 0, all objects: 0

2018-03-03T05:52:45.362Z - normal: Simulator: D/jswrapper (510): ScriptEngine::cleanup end …

2018-03-03T05:58:13.849Z - normal: Simulator: SCREEN DPI = 96, SCREEN SCALE = 1.00

2018-03-03T05:58:13.853Z - normal: Simulator: WORKAREA WIDTH 1432.00, HEIGHT 810.00

2018-03-03T05:58:13.854Z - normal: Simulator: FRAME SCALE = 1.00

2018-03-03T05:58:14.251Z - normal: Simulator: Ready for GLSL

2018-03-03T05:58:14.252Z - normal: Simulator: Ready for OpenGL 2.0

2018-03-03T05:58:14.259Z - normal: Simulator:

2018-03-03T05:58:14.260Z - normal: Simulator: {

2018-03-03T05:58:14.261Z - normal: Simulator: gl.version: 4.2.11399 Compatibility Profile Context

2018-03-03T05:58:14.262Z - normal: Simulator: gl.supports_NPOT: true

2018-03-03T05:58:14.263Z - normal: Simulator: cocos2d.x.version: 1.7.0

2018-03-03T05:58:14.275Z - normal: Simulator: cocos2d.x.compiled_with_profiler: false

2018-03-03T05:58:14.276Z - normal: Simulator: cocos2d.x.build_type: DEBUG

2018-03-03T05:58:14.277Z - normal: Simulator: cocos2d.x.compiled_with_gl_state_cache: true

2018-03-03T05:58:14.278Z - normal: Simulator: gl.max_texture_size: 16384

2018-03-03T05:58:14.279Z - normal: Simulator: gl.supports_OES_packed_depth_stencil: false

2018-03-03T05:58:14.280Z - normal: Simulator: gl.vendor: ATI Technologies Inc.

2018-03-03T05:58:14.281Z - normal: Simulator: gl.renderer: ATI Radeon HD 5700 Series

2018-03-03T05:58:14.282Z - normal: Simulator: gl.max_texture_units: 32

2018-03-03T05:58:14.283Z - normal: Simulator: gl.supports_ETC1: false

2018-03-03T05:58:14.284Z - normal: Simulator: gl.supports_PVRTC: false

2018-03-03T05:58:14.284Z - normal: Simulator: gl.supports_BGRA8888: false

2018-03-03T05:58:14.285Z - normal: Simulator: gl.supports_discard_framebuffer: false

2018-03-03T05:58:14.286Z - normal: Simulator: gl.supports_vertex_array_object: true

2018-03-03T05:58:14.287Z - normal: Simulator: gl.supports_OES_map_buffer: false

2018-03-03T05:58:14.288Z - normal: Simulator: gl.supports_OES_depth24: false

2018-03-03T05:58:14.288Z - normal: Simulator: }

2018-03-03T05:58:14.289Z - normal: Simulator:

2018-03-03T05:58:14.290Z - normal: Simulator:

2018-03-03T05:58:14.291Z - normal: Simulator: cocos2d: warning, Director::setProjection() failed because size is 0

2018-03-03T05:58:14.292Z - normal: Simulator: Project Config:

2018-03-03T05:58:14.293Z - normal: Simulator: project dir: F:\CocosCreator\resources\cocos2d-x\simulator\win32\

2018-03-03T05:58:14.293Z - normal: Simulator: writable path: $(PROJDIR)\

2018-03-03T05:58:14.294Z - normal: Simulator: script file: $(PROJDIR)\main.js

2018-03-03T05:58:14.295Z - normal: Simulator: frame size: 960 x 640

2018-03-03T05:58:14.296Z - normal: Simulator: frame scale: 1.00

2018-03-03T05:58:14.297Z - normal: Simulator: show console: NO

2018-03-03T05:58:14.298Z - normal: Simulator: write debug log: NO ()

2018-03-03T05:58:14.298Z - normal: Simulator: listen:

2018-03-03T05:58:14.299Z - normal: Simulator: debugger: none

2018-03-03T05:58:14.300Z - normal: Simulator: add searching path:

2018-03-03T05:58:14.300Z - normal: Simulator:

2018-03-03T05:58:14.301Z - normal: Simulator:

2018-03-03T05:58:14.302Z - normal: Simulator:

2018-03-03T05:58:14.319Z - normal: Simulator: ------------------------------------------------

2018-03-03T05:58:14.320Z - normal: Simulator: LOAD Js FILE: main.js

2018-03-03T05:58:14.320Z - normal: Simulator: ------------------------------------------------

2018-03-03T05:58:14.321Z - normal: Simulator: D/jswrapper (364): Initializing V8, version: 6.0.286.52

2018-03-03T05:58:14.837Z - normal: Simulator: D/jswrapper (813): libuv version: 1.13.1

2018-03-03T05:58:14.838Z - normal: Simulator: D/jswrapper (112): Debugger listening…, visit [ chrome-devtools://devtools/bundled/inspector.html?v8only=true&ws=0.0.0.0:5086/00010002-0003-4004-8005-000600070008 ] in chrome browser to debug!

2018-03-03T05:58:14.839Z - normal: Simulator: D/jswrapper (115): For help see https://nodejs.org/en/docs/inspector

2018-03-03T05:58:15.317Z - normal: Simulator: D/jswrapper (125): JS: Cocos2d-x-lite v1.7.0

2018-03-03T05:58:15.721Z - normal: Simulator: iShow!

2018-03-03T05:58:15.839Z - normal: Simulator: D/jswrapper (125): JS: InitScene: 1.58299999999997ms

2018-03-03T05:58:15.841Z - normal: Simulator: D/jswrapper (125): JS: AutoRelease: 0.22900000000004184ms

2018-03-03T05:58:15.842Z - normal: Simulator: D/jswrapper (125): JS: Destroy: 0.13999999999998636ms

2018-03-03T05:58:15.842Z - normal: Simulator: D/jswrapper (125): JS: AttachPersist: 0.013999999999896318ms

2018-03-03T05:58:15.843Z - normal: Simulator: D/jswrapper (125): JS: Activate: 3.175000000000068ms

2018-03-03T05:59:20.965Z - normal: Simulator: D/jswrapper (147): XMLHttpRequest (089671A8) receives DIRECTOR::EVENT_RESET, retain self.

2018-03-03T05:59:20.966Z - normal: Simulator: D/jswrapper (147): XMLHttpRequest (0885DC18) receives DIRECTOR::EVENT_RESET, retain self.

2018-03-03T05:59:21.020Z - normal: Simulator: D/jswrapper (447): ScriptEngine::cleanup begin …

2018-03-03T05:59:21.020Z - normal: Simulator: D/jswrapper (588): GC begin …, (js->native map) size: 28, all objects: 309

2018-03-03T05:59:21.069Z - normal: Simulator: D/jswrapper (535): XMLHttpRequest_finalize, 089671A8 …

2018-03-03T05:59:21.070Z - normal: Simulator: D/jswrapper (535): XMLHttpRequest_finalize, 0885DC18 …

2018-03-03T05:59:21.136Z - normal: Simulator: D/jswrapper (596): GC end …, (js->native map) size: 22, all objects: 305

2018-03-03T05:59:21.136Z - normal: Simulator: D/jswrapper (588): GC begin …, (js->native map) size: 22, all objects: 305

2018-03-03T05:59:21.195Z - normal: Simulator: D/jswrapper (596): GC end …, (js->native map) size: 22, all objects: 305

2018-03-03T05:59:21.197Z - normal: Simulator: D/jswrapper (588): GC begin …, (js->native map) size: 0, all objects: 0

2018-03-03T05:59:21.235Z - normal: Simulator: D/jswrapper (596): GC end …, (js->native map) size: 0, all objects: 0

2018-03-03T05:59:21.317Z - normal: Simulator: D/jswrapper (510): ScriptEngine::cleanup end …

--------------------------------------------- 上面是客户端输出的提示---------------------------------------------

cc.Class({
extends: cc.Component,

properties: {

},
// LIFE-CYCLE CALLBACKS:
onLoad: function (){
    let socket = io("http://localhost:3000");
    socket.on('welcome',function(data){
        console.log('data = ' + data);
    });
}

});
--------------------------------------------- 上面是客户端代码---------------------------------------------

const socket = require(‘socket.io’);
const app = socket(‘3000’);
app.on(‘connection’, function (socket) {
console.log(‘a user connected’);
socket.emit(‘welcome’,‘hello world’);
});
console.log(“启用监听端口:3000”);
--------------------------------------------- 上面是服务端代码---------------------------------------------
{
“name”: “doudizhu_server”,
“version”: “1.0.0”,
“description”: “doudizhu_server”,
“main”: “app.js”,
“scripts”: {
“test”: “node app.js”,
“start”: “node app.js”
},
“keywords”: [
“game”
],
“author”: “”,
“license”: “ISC”,
“dependencies”: {
socket.io”: “^2.0.4”
}
}
--------------------------------------------- 上面是package.json代码---------------------------------------------

helpe me helpe me !!!
不报错,也不提示, 到底怎么了?对照教程写的啊?

helpe me helpe me !!!
不报错,也不提示, 到底怎么了?对照教程写的啊?

@jare @panda

大神求助啊。!!!

socket.io 插件呢,引入没有啊

http://localhost:3000 换成 ws://localhost:3000 或者 localhost:3000 试试呢

好用了, 谢谢, http://localhost:3000 我启动了HTTP服务就可以了。

const server = require(‘http’).Server(app);
let socket = io.connect(“http://localhost:4747”);
这两个对应上就OK了。