snowkit / linc_enet Goto Github PK
View Code? Open in Web Editor NEWhttp://snowkit.github.io/linc/ Haxe/hxcpp @:native bindings for Enet networking
License: MIT License
http://snowkit.github.io/linc/ Haxe/hxcpp @:native bindings for Enet networking
License: MIT License
I'm using ENetPeer's connectID to keep track of who is who in my server code, and it stays consistent, but it becomes 0 when I handle a disconnection event. Code below (issue arrises in the ENetEventType.ENET_EVENT_TYPE_DISCONNECT case). I suspect the peer/event is deleted in the c code before it reaches the Haxe wrappers or something...
var event:ENetEvent = null;
var eventStatus:Int = ENet.host_service(host, cast event, 0);
if (eventStatus > 0)
{
var peer = event.peer;
var adress = peer.address;
var host = adress.host;
switch(event.type)
{
case ENetEventType.ENET_EVENT_TYPE_CONNECT:
peers.set(peer.connectID, peer);
connected = true;
if (onConnect != null)
onConnect(Std.int(peer.connectID));
case ENetEventType.ENET_EVENT_TYPE_DISCONNECT:
peers.remove(peer.connectID);
if (onDisconnect != null)
onDisconnect(Std.int(peer.connectID));
Error: Could not find include file "Y:/lib/snowkit/linc_enet/lib/enet/files.xml"
Error: Build failed
where can I find files.xml?
haxe version 4.0.0 rc2, hxcpp: 4.0.8
Hi there. I just got the test app then, and it won't run.
I am executing the text on a Windows 10 machine, 64 Bit. The majority of the errors are C++ errors, and largely link to winsock.h. I have edited the HXML to compile only server/client, and both fail with the same error.
I did some research on this particular winsock issue, and found this response on stack overflow: SO Post
I have MSVC 2013 community installed, and can compile all other c++ haxe things fine.
Here is the log file, it is crazy long, although really just comes down to errors with winsock. It is actually so long terminal cuts off the top portion, I don't know how much I am missing.
Hastebin
It does seem to have a few linc issues down the very bottom:
C:\....enet\include\enet/enet.h(588) : error C2059: syntax error : '}'
C:\...\enet\include\enet/enet.h(588) : error C2143: syntax error : missing ';' before '}'
C:\...\linc\linc_enet.h(10) : error C2143: syntax error : missing ';' before '{'
C:...\linc\linc_enet.h(10) : error C2447: '{' : missing function header (old-style formal list?)
Cheers! I will continue to try and get this working. Thanks a heap!
/usr/share/haxe/lib/linc_enet/git/lib//enet/src/unix.c
Error: /usr/share/haxe/lib/linc_enet/git/lib//enet/src/unix.c:57:13: error: conflicting types for ‘socklen_t’
typedef int socklen_t;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.