Results 1 to 6 of 6

Thread: CL_NetSession and Win x64

  1. #1
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default CL_NetSession and Win x64

    Anyone else running windows XP 64 bit and getting an infinite hang when calling netsession.start_listen() ?

    Even the example hangs for me. Is it just because I have 64 bit windows, or something else?

  2. #2
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default

    Well now I'm a little confused, I ran the programs on my wife's win xp pro box (32 bit of course) with the same result.

    Could I be doing something wrong? I'm revisiting an older CL 0.7x application... It worked fine back in the day. Basically I've just updated my Lua, libmysql, and Clan Lib and am getting these results.

    It for sure is hanging on the start_listen call. No errors thrown. Just sits there. I don't think my router would have anything to do with this ?

  3. #3
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default

    Okay. It works. But. It takes about 5 minutes for the port to open and the program to commence. Maybe thread related?

    Ahhhh.......! Here's the code in question. Very much out of the example netchannel demo.


    netSession = NULL;

    try
    {
    netSession = new CL_NetSession("message");

    // Connect slots
    slot_connect = netSession->sig_computer_connected().connect(this,
    &Main:n_computer_connect);
    slot_disconnect = netSession->sig_computer_disconnected().connect(this,
    &Main:n_computer_disconnect);
    slot_receive_message = netSession->sig_netpacket_receive("message").connect(this,
    &Main:n_message_receive);

    // Listen port
    std::cout << "Opening Port..." << std::endl;
    netSession->start_listen("7667");

    std::cout << "Port open." << std::endl;
    }
    catch(CL_Error err)
    {
    std::cout << "Server initialization error: " << err.message.c_str() << std::endl;
    return false;
    }

    try
    {
    server = new Server();
    // Main loop
    while (true)
    {
    CL_System::keep_alive();
    CL_System::sleep(10);
    }

    // Destroy game server
    delete server;
    }
    catch (CL_Error err)
    {
    std::cout << "Fatal server error: " << err.message.c_str() << std::endl;
    }

    delete netSession;
    return true;






    Any thoughts on that?

  4. #4
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,345

    Default

    Hrm.

    There was a windows problem with mutex locking that resulted in like a 5 minute delay that I noticed with the IRC chat example, but I fixed it before the 0.8 release IIRC.

    I'd suggest working from the 0.8 SVN to be safe if you're not.
    Seth A. Robinson
    Robinson Technologies

  5. #5
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default

    Hmm... Okay, I'll get the 0.8 svn and try running from that.

    I'm currently using the 0.8 release version.

  6. #6
    Lesser Wizard
    Join Date
    Jun 2007
    Posts
    109

    Default

    It worked!!! Thanks Seth.

    Was def a thread related bug then. I'm feelin good now. Woooo.!

Similar Threads

  1. CL_NetSession, CL_NetComputer & udp
    By goldbrick in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 03-23-2007, 04:21 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •