Exposing the sleep amount time might be a good idea considering 200 ms makes it totally useless for anything that needs to run in real-time, like games.

Are you emitting a signal for each packet received, too?

On 2012-10-24 03:49, Nathan Osman wrote:
The overhead is quite minimal. Take the peerConnected() signal emitted by QENetHost, for example. Basically all I do once an ENET_EVENT_TYPE_CONNECT comes in is create a QENetPeer instance and assign the pointer to the data member of the ENetPeer struct. Then a signal is emitted with the pointer to the QENetPeer instance.

My biggest performance-related concern at this point is the QTimer that calls enet_host_service(). I am using 200 milliseconds right now and that seems to work well, but I haven't done any extensive investigation. I might end up making that number a configurable setting.

- Nathan

On Tue, Oct 23, 2012 at 4:22 PM, Jay Sprenkle <[email protected] <mailto:[email protected]>> wrote:

    Interesting. I'm using enet and Qt in a project as well.
    Do you have any idea how much overhead using signals and slots adds?

    On Tue, Oct 23, 2012 at 4:51 PM, Nathan Osman
    <[email protected] <mailto:[email protected]>> wrote:

        I am pleased to announce the first beta of a Qt wrapper for
        the ENet library written in C++. The project page can be found
        here on Launchpad: https://launchpad.net/qenet

    ---
    /"Why do you have that banana in your ear?"
    "To keep away the alligators."
    "But there are no alligators here."
    "See! It's working!"/
    /--/


    _______________________________________________
    ENet-discuss mailing list
    [email protected] <mailto:[email protected]>
    http://lists.cubik.org/mailman/listinfo/enet-discuss




_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss

_______________________________________________
ENet-discuss mailing list
[email protected]
http://lists.cubik.org/mailman/listinfo/enet-discuss

Reply via email to