Endpoint::Endpoint(Dispatcher &d) : dispatcher(d), session(NULL), protocol(NULL), sock(d.io_service()) { local.hostname = hostname(); }