// $Id$
//
// Copyright (C) 2007
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-// Thorsten Horstmann <thorsten.horstmann@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Thorsten Horstmann <tho@berlios.de>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
public:
Server(senf::INet4Address const & host, unsigned int port)
: serverSock(senf::INet4SocketAddress(host, port)) {}
-
- void run()
+
+ void run()
{
senf::Scheduler::instance().add(
- serverSock,
+ serverSock,
senf::membind(&Server::accept, this),
senf::Scheduler::EV_READ);
senf::Scheduler::instance().process();
}
-
+
private:
- void accept(senf::FileHandle /* ignored */, senf::Scheduler::EventId event)
+ void accept(int event)
{
senf::TCPv4ClientSocketHandle clientSock (serverSock.accept());
senf::Scheduler::instance().add(
clientSock,
- senf::membind(&Server::readFromClient, this),
+ boost::bind(&Server::readFromClient, this, clientSock, _1),
senf::Scheduler::EV_READ);
}
-
- void readFromClient(senf::TCPv4ClientSocketHandle clientSock, senf::Scheduler::EventId event)
+
+ void readFromClient(senf::TCPv4ClientSocketHandle clientSock, int event)
{
if (!clientSock) {
senf::Scheduler::instance().remove(clientSock);