Results 1 to 2 of 2

Thread: Issue with server connection

  1. #1

    Default Issue with server connection

    Hey all, I'm slowly learning ClanLib and doing an old tutorial ( as part of the process. I am down to the part where I have created the client and server to test connecting. I am using ClanLib 3.0.1, so I made the necessary changes to get rid of syntax errors. However, when I go to build the project, I receive the following error:

    1>c:\development\environment\clanlib\include\clanl ib\core\signals\slot_container.h(105): error C2660: 'clan::Signal_v2<Param1,Param2>::connect' : function does not take 2 arguments
    1> with
    1> [
    1> Param1=clan::NetGameConnection *,
    1> Param2=const std::string &
    1> ]
    1> c:\users\matthew\documents\visual studio 2010\projects\clanlibtest\clientservertest\server. cpp(8) : see reference to function template instantiation 'void clan::SlotContainer::connect<clan::Signal_v2<Param 1,Param2>,Server,clan::NetGameConnection*>(SigClas s &,Class *,void (__thiscall Server::* )(Param1))' being compiled
    1> with
    1> [
    1> Param1=clan::NetGameConnection *,
    1> Param2=const std::string &,
    1> SigClass=clan::Signal_v2<clan::NetGameConnection *,const std::string &>,
    1> Class=Server
    1> ]
    I cannot for the life of me figure out what is going on here, and why the project will not build. The lines in question are in the constructor:

        slots.connect(network_server.sig_client_connected(), this, &Server::on_client_connected);
        slots.connect(network_server.sig_client_disconnected(), this, &Server::on_client_disconnected);
        slots.connect(network_server.sig_event_received(), this, &Server::on_event_received);
    Is anyone able to tell me what I need to change?

  2. #2
    ClanLib Developer
    Join Date
    May 2007


    void Server::on_client_disconnected(NetGameConnection *connection, const std::string &message)

    "const std::string &message" was added at some point

    Sorry for slow reply, for some reason your post was "moderated" waiting for approval

Similar Threads

  1. ''connection timed out.try later?'' help!
    By playerkid in forum Bugs & Glitches
    Replies: 2
    Last Post: 08-22-2013, 12:52 AM
  2. Connection Issues
    By yourdog in forum Tanked
    Replies: 6
    Last Post: 07-18-2013, 02:14 PM
  3. Connection Problems
    By Angrox in forum Bugs & Glitches
    Replies: 4
    Last Post: 03-15-2013, 06:47 PM



Posting Permissions

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