summaryrefslogtreecommitdiff
path: root/muxSocket.cpp
blob: 8adfb2bedc0ccefe8447de4d46788c96aaad86d0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <sstream>
#include <iostream>
#include <string>

#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();
//}