Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket server #17944

Closed
n-bes opened this issue Jun 18, 2017 · 8 comments
Closed

Websocket server #17944

n-bes opened this issue Jun 18, 2017 · 8 comments
Assignees
Milestone

Comments

@n-bes
Copy link

n-bes commented Jun 18, 2017

Hello everybody. I want to make a websocket server on the device. After I saw that the server support was disabled (-DLWS_WITHOUT_SERVER=1, I originally tried to connect the client). I tried to rebuild the library, but got link errors after replace libwebsockets.a. Please enable server support, or help me rebuild the libwebsockets. If you need a log / sources, I'll send them. Thx

@dumganhar
Copy link

Cocos2d-x just uses the client source of libwebsockets and WebSocket class is a wrapper for libwebsockets client. We don't have any plans to support of setting up a websocket server in engine.

@n-bes
Copy link
Author

n-bes commented Jun 19, 2017

I don't use Websocket class. Now, i want server functions to be included in the libwebsockets, but not the cocos2dx engine. I'll write WebSocketServer myself (using lws_create_context, etc).

@dumganhar
Copy link

So you probably need to go to https://github.com/warmcat/libwebsockets for help.

@n-bes
Copy link
Author

n-bes commented Jul 13, 2017

I'm solve my problem after update from 3.14.1 to 3.15.1 and rebuild libwebsockets

@RockJoey
Copy link

@013ez can you solve your problem by using 3.16? I use the latest one, but can't work.

@PatriceJiang
Copy link
Contributor

WebSocket server added to static libraries. @minggo

@brantxiong
Copy link

WebSocket server added to static libraries. @minggo

Hi, @minggo Thanks for adding WebSocket Server. But I cannot find any document about how to use the WebSocket Server in js.

Could you give an example on how to setup a WebSocket Server in js script in Cocos Creator V2.1.2? Thanks so much!

@minggo
Copy link
Contributor

minggo commented Oct 11, 2019

Cocos Creator doesn't use cocos2d-x, you should ask it in the forum or Cocos Creator repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants