+#include <msp/core/refptr.h>
#include <msp/net/inet.h>
+#include <msp/net/resolve.h>
#include "libr2c2/driver.h"
#include "libr2c2/route.h"
#include "libr2c2/train.h"
for(map<unsigned, Train *>::const_iterator i=trains.begin(); i!=trains.end(); ++i)
train_added(*i->second);
- listen_sock.listen(Net::InetAddr(0, 8315), 4);
+ RefPtr<Net::SockAddr> addr = Net::resolve("*", "8315", Net::INET);
+ listen_sock.listen(*addr, 4);
listen_sock.signal_data_available.connect(sigc::mem_fun(this, &Server::incoming_connection));
}
void Server::Connection::end_of_file()
{
- socket->close();
stale = true;
}
#include <msp/io/eventdispatcher.h>
#include <msp/net/communicator.h>
#include <msp/net/streamsocket.h>
-#include <msp/net/streamlistensocket.h>
+#include <msp/net/streamserversocket.h>
#include "libr2c2/layout.h"
#include "libr2c2/trainstatus.h"
#include "packets.h"
Protocol proto;
Layout &layout;
- Msp::Net::StreamListenSocket listen_sock;
+ Msp::Net::StreamServerSocket listen_sock;
Msp::IO::EventDispatcher *event_disp;
std::vector<Connection *> connections;