MainConnectionHandler::MainConnectionHandler( const net::LocalEndpointR& local) :m_localEndPoint(local) ,m_input(0) ,m_inputsize(0) ,m_output(0) ,m_outputsize(0) ,m_terminated(false) ,m_exceptionByeMessagePtr(0) { m_input = (char*)std::malloc( NeworkBufferSize); m_output = (char*)std::malloc( NeworkBufferSize); if (!m_input || !m_output) { if (m_input) std::free( m_input); if (m_output) std::free( m_output); throw std::bad_alloc(); } LOG_TRACE << "Created connection handler for " << local->toString(); }
Connection::Connection( const net::LocalEndpointR& local, unsigned int inputBufferSize, unsigned int outputBufferSize) { data = new Private( inputBufferSize, outputBufferSize); LOG_TRACE << "Created connection handler for " << local->toString(); }