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

Could not connect to localhost:8172: connection refused #14

Closed
TheSHEEEP opened this issue Oct 22, 2014 · 3 comments
Closed

Could not connect to localhost:8172: connection refused #14

TheSHEEEP opened this issue Oct 22, 2014 · 3 comments
Assignees

Comments

@TheSHEEEP
Copy link

My issue is similar to this one: #4

However, I did use the correct Lua version (5.1) from the beginning.

I compiled both LuaJIT-2.0.3 and the latest luasocket (3.0 rc1) with MinGW and embedded both into our application.
This is how luasocket is embedded (put into preload):

lua_getfield(_luascript->get_ptr(), LUA_GLOBALSINDEX, "package");
lua_getfield(_luascript->get_ptr(), -1, "preload");
lua_pushcfunction(_luascript->get_ptr(), luaopen_socket_core);
lua_setfield(_luascript->get_ptr(), -2, "socket.core");

The application is linked against the "socket.dll.3.0-rc1" (which is the weirdest name ever for a DLL...) and loads it just fine when the application starts.

I have also copied mobdebug.lua into our scripts folder. However, I get the error in the description as soon as I require("mobdebug").start().

I wanted to use luasocket-2.0.2 instead, but it seems that it cannot be compiled in MinGW without serious hassle, so I stopped trying.

@TheSHEEEP
Copy link
Author

By now, I managed to get luasocket-2.0.2 compiled. However, the error message is exactly the same.

@TheSHEEEP
Copy link
Author

Ugh, forget that. Windows blocked my debugging server.

@pkulchenko pkulchenko self-assigned this Oct 22, 2014
@pkulchenko
Copy link
Owner

ok, thank you for the update; closing...

For users who may come across the same issue, other reasons for the same error are captured in this FAQ answer.

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