#include <msp/core/refptr.h>
#include <msp/net/inet.h>
#include <msp/net/resolve.h>
#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"
#include "libr2c2/driver.h"
#include "libr2c2/route.h"
#include "libr2c2/train.h"
{
for(vector<Connection *>::const_iterator i=connections.begin(); i!=connections.end(); ++i)
if(!(*i)->stale && (*i)->comm.is_handshake_done())
{
for(vector<Connection *>::const_iterator i=connections.begin(); i!=connections.end(); ++i)
if(!(*i)->stale && (*i)->comm.is_handshake_done())
{
socket->signal_end_of_file.connect(sigc::mem_fun(this, &Connection::end_of_file));
comm.signal_handshake_done.connect(sigc::mem_fun(this, &Connection::handshake_done));
{
socket->signal_end_of_file.connect(sigc::mem_fun(this, &Connection::end_of_file));
comm.signal_handshake_done.connect(sigc::mem_fun(this, &Connection::handshake_done));
const map<unsigned, Train *> &trains = server.layout.get_trains();
for(map<unsigned, Train *>::const_iterator i=trains.begin(); i!=trains.end(); ++i)
{
const map<unsigned, Train *> &trains = server.layout.get_trains();
for(map<unsigned, Train *>::const_iterator i=trains.begin(); i!=trains.end(); ++i)
{