From 16156b2acfd23b3f07c4f8df5da26c9c32008338 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Thu, 28 Feb 2008 19:18:30 +0000 Subject: added muxSocket --- muxSocket.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 muxSocket.cpp (limited to 'muxSocket.cpp') diff --git a/muxSocket.cpp b/muxSocket.cpp new file mode 100644 index 0000000..8adfb2b --- /dev/null +++ b/muxSocket.cpp @@ -0,0 +1,40 @@ +#include +#include +#include + +#include "Sockets/Utility.h" +#include "muxSocket.h" +//#include "log.h" + +#ifdef SOCKETS_NAMESPACE +using namespace SOCKETS_NAMESPACE; +#endif // SOCKETS_NAMESPACE + + +MuxSocket::MuxSocket(ISocketHandler& h) +:TcpSocket(h) +{ + SetConnectTimeout(12); +} + + + +void MuxSocket::OnAccept() +{ + Send( Utility::GetLocalHostname() + "\n"); + Send( Utility::GetLocalAddress() + "\n"); + Send("Number of sockets in list : " + Utility::l2string(Handler().GetCount()) + "\n"); + Send("\n"); + //TODO Locking here +} + +//void StatusSocket::InitSSLServer() +//{ +// InitializeContext("server.pem", "keypwd", SSLv23_method()); +//} +// +// +//void StatusSocket::Init() +//{ +// EnableSSL(); +//} -- cgit v1.2.3