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

一个进程中有多个luaState, 我该如何每个虚拟机监听1个端口? #71

Open
yanwei1983 opened this issue Nov 26, 2024 · 4 comments

Comments

@yanwei1983
Copy link

我一个进程内有多个lua虚拟机, 我想每个虚拟机各自监听一个端口/或者只监听1个端口, 该怎么做?
现在调用tcpListen后一个会覆盖前一个

@CppCXY
Copy link
Member

CppCXY commented Nov 26, 2024

实际上这样是没啥用的, 因为EmmyFacade是单例, 多个虚拟机其实是共享的一个调试实例

@CppCXY
Copy link
Member

CppCXY commented Nov 26, 2024

不过有个方法是tcpSharedListen 或许可以试试

@yanwei1983
Copy link
Author

tcpSharedListen 是避免多个lua_thread调用多次tcpListen, 本质上无法满足我的需求
我希望进程内多个luaStates(不是lua_thread)能够被emma接管

@CppCXY
Copy link
Member

CppCXY commented Nov 26, 2024

windows下只有附加调试可以试试了

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

No branches or pull requests

2 participants