X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FServer.cci;h=b68443977c40485b98db726a989dc9f841880ae7;hb=1863c038d0400159ce49b851a5b81c2ce698c684;hp=8e0d434b125eabcfc8baceefadebf68c66522edf;hpb=1a7c3a40d3e477b789c3fdfe7cacb01649d47edf;p=senf.git diff --git a/Console/Server.cci b/Console/Server.cci index 8e0d434..b684439 100644 --- a/Console/Server.cci +++ b/Console/Server.cci @@ -37,12 +37,25 @@ prefix_ senf::console::detail::NonblockingSocketSink::NonblockingSocketSink(Clie : client_ (client) {} +prefix_ senf::console::Client & senf::console::detail::NonblockingSocketSink::client() + const +{ + return client_; +} + /////////////////////////////////////////////////////////////////////////// // senf::console::Server -prefix_ void senf::console::Server::name(std::string const & name) +prefix_ senf::console::Server & senf::console::Server::name(std::string const & name) { name_ = name; + return *this; +} + +prefix_ void senf::console::Server::stop() +{ + // commit suicide + instancePtr().reset(0); } /////////////////////////////////////////////////////////////////////////// @@ -129,6 +142,11 @@ prefix_ std::string senf::console::Client::promptString() return name_ + ":" + executor_.cwd().path() + "$ "; } +prefix_ senf::console::Client & senf::console::Client::get(std::ostream & os) +{ + return dynamic_cast(os)->client(); +} + prefix_ senf::console::Client::ClientHandle senf::console::Client::handle() const {