Results 1 to 3 of 3

Thread: Network-Problem

  1. #1

    Default Network-Problem

    hello =)

    it's me again

    and i have a problem...

    i want to play a litte with the netgame engine but i think it doesn't like me

    here is a pic from the exception:



    my code:

    Code:
    CGame::CGame()
    {
    	slots.connect(network_client.sig_event_received(), this, &CGame::on_event_received);
    	slots.connect(network_client.sig_connected(), this, &CGame::on_connected);
    	slots.connect(network_client.sig_disconnected(), this, &CGame::on_disconnected);
    
    	// Set up event dispatchers to route incoming events to functions
    	login_events.func_event("Login-Success").set(this, &CGame::on_event_login_success);
    	login_events.func_event("Login-Fail").set(this, &CGame::on_event_login_fail);
    
    	this->connected = false;
    	this->logged_in = false;
    	this->State = login;
    }
    
    CGame::~CGame()
    {
    }
    
    void CGame::connect_to_srv()
    {
    	try
    	{
    		this->network_client.connect("127.0.0.1","4009");
    	}
    	catch(CL_Exception e)
    	{
    		std::vector<CL_String> stackTrace = e.get_stack_trace();
    		CL_String text = e.message + "\r\n";
    		for (size_t i = 0; i < stackTrace.size(); i++)
    		text += cl_format("\r\n#%1 %2", i, stackTrace[i]);
    
    		MessageBox(0, text.c_str(), TEXT("Unhandled Exception"), MB_OK);
    	}
    }
    i create this class in my window class a try to connect_to_srv

    and the result you can see on the picture..

    does someone knows what it is ?

    because it seems to be that the socket can't create but why.. i don't know

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    - Did you initialize clannetwork?

    CL_SetupNetwork setup_network;

    - Does the NetGame example that comes with ClanLib work for you?

  3. #3

    Default

    ****...

    i'm stupid

    thanks that the thing i forgot

Similar Threads

  1. Clan Network
    By catch22 in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 03-17-2009, 04:36 PM
  2. Network drops on windows?
    By CrazyFrazee in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 01-25-2009, 03:36 PM
  3. Is the Dink Network down?
    By Prophet422 in forum Dink Smallwood HD
    Replies: 1
    Last Post: 11-12-2004, 03:01 AM
  4. how do i get an account with the dink network?
    By AgressiveNapkin in forum RTsoft Tavern
    Replies: 1
    Last Post: 02-12-2004, 09:15 AM
  5. The Dink Network Is Down
    By redink1 in forum Dink Smallwood HD
    Replies: 6
    Last Post: 01-22-2003, 11:51 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
  •