Click to See Complete Forum and Search --> : syntax coloring


Mathew Joy
January 27th, 2004, 11:32 PM
#include "stdafx.h"
#include "IOCPServer.h"
#include "CIOCPServer.h"

//#include "Stackwalker.h"
#include <fstream>

using namespace std ; // for list container

#define SO_CONDITIONAL_ACCEPT 0x3002

list<long> gIndexList;
list<long>::iterator gi;

_CrtMemState start, end, diff;
CRITICAL_SECTION CS;

void TextOut(char *str);


/////////////////////////////////////////////////////////////////////////////
// CIOCPServer

CIOCPServer *CIOCPServer::m_this = NULL;

CIOCPServer::CIOCPServer() {

//InitAllocCheck(ACOutput_Simple );

_CrtMemCheckpoint(&start);

m_bWindowOnly = TRUE;
m_bIsInit = FALSE;
m_this = this;
m_bIsRunning = true;
m_bShutdownMode = false;

/*
* setting property default values
*/
m_lTimeOut = 2 * 60 * 1000; // 2 mins is the default timeout value
m_lMaxConn = 0; // 0 => infinite
m_lMaxConnPerIP = 0; // 0 => infinite


m_heAccept = CreateEvent(NULL,TRUE,FALSE,NULL);
m_heClose = CreateEvent (NULL,TRUE,FALSE,NULL);
m_heCancelIoComplete = CreateEvent(NULL,FALSE,FALSE,NULL);

InitializeCriticalSection(&CS);
}


#include "stdafx.h"
#include "IOCPServer.h"
#include "CIOCPServer.h"

//#include "Stackwalker.h"
#include <fstream>

using namespace std ; // for list container

#define SO_CONDITIONAL_ACCEPT 0x3002

list<long> gIndexList;
list<long>::iterator gi;

_CrtMemState start, end, diff;
CRITICAL_SECTION CS;

void TextOut(char *str);


/////////////////////////////////////////////////////////////////////////////
// CIOCPServer

CIOCPServer *CIOCPServer::m_this = NULL;

CIOCPServer::CIOCPServer() {

//InitAllocCheck(ACOutput_Simple );

_CrtMemCheckpoint(&start);

m_bWindowOnly = TRUE;
m_bIsInit = FALSE;
m_this = this;
m_bIsRunning = true;
m_bShutdownMode = false;

/*
* setting property default values
*/
m_lTimeOut = 2 * 60 * 1000; // 2 mins is the default timeout value
m_lMaxConn = 0; // 0 => infinite
m_lMaxConnPerIP = 0; // 0 => infinite


m_heAccept = CreateEvent(NULL,TRUE,FALSE,NULL);
m_heClose = CreateEvent (NULL,TRUE,FALSE,NULL);
m_heCancelIoComplete = CreateEvent(NULL,FALSE,FALSE,NULL);

InitializeCriticalSection(&CS);
}

Mathew Joy
January 27th, 2004, 11:34 PM
666 code works great. Only difference is the alignment.