GithubHelp home page GithubHelp logo

linc_enet's People

Contributors

dazkind avatar ruby0x1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

sunjammer

linc_enet's Issues

peer.connectID is 0 when it's an ENET_EVENT_TYPE_DISCONNECT event

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));

Test project will not run.

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!

conflicting types for ‘socklen_t’ ? on linux

/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;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.