Comments (3)
This exact same thing happened to me, but I'm using https://github.com/zpl-c/enet. After some debugging, turns out we have undefined behavior with that modification of ENet: an uninitialized variable. In file enet.c
, line 219, change ENetAddress address;
to ENetAddress address = {0};
.
The field sin6_scope_id
of the struct ENetAddress
does not exist in the original ENet library so it is not being assigned. It may contain garbage and seems like it needs to be zero for enet_host_create
to work.
from lua-enet.
It was simpler than I thought.
Check your firewall rules. After I allowed everything to the port I used, host wasn't nil anymore!
from lua-enet.
host
is nil
because the call to host_create
failed and returned nil
. In Lua it's typically for functions to return two values on error, nil as the first and a string describing the error. There can be many reasons why host might fail to create, the most common is that something else is already listening on that port.
Hope that helps.
from lua-enet.
Related Issues (12)
- lua-enet on Windows HOT 8
- Inconsistency between documentation and actual function name for host_socket_get_address() HOT 1
- Build issues on ubuntu 12.04 HOT 3
- error loading module enet HOT 1
- undefined symbol: luaL_register
- Peer round trip time information HOT 1
- Undefined symbol: luaL_openlib HOT 1
- MSVCR80.dll issue HOT 4
- undefined symbol: luaL_checkint
- add some server send, broadcast, channel, flag for examples.
- Suggestions; adding the following to ENetHost references in Lua.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-enet.