Return Type | Function name | Arguments |
---|---|---|
hzEcode | hzIpConnex::Initialize | (hzIpListen*,SSL*,hzIpaddr,unsigned int,unsigned int,unsigned int,) |
Declared in file: hzIpServer.h
Defined in file : hzIpServer.cpp
Function Logic:
Function body:
hzEcode hzIpConnex::Initialize (hzIpListen* pLS, SSL* pSSL, hzIpaddr ipa, unsigned int cliSock, unsigned int cliPort, unsigned int eventNo) { _hzfunc("hzIpConnex::Initialize") ; if (m_nSock) return hzerr(E_DUPLICATE, "Attempt to init connection to socket %d - already has socket %d", cliSock, m_nSock) ; if (!pLS) return hzerr(E_ARGUMENT, "No listening socket class instance provided") ; m_nsAccepted = RealtimeNano() ; m_ClientIP = ipa ; m_nSock = cliSock ; m_nPort = cliPort ; m_nMsgno = eventNo ; m_OnIngress = pLS->m_OnIngress ; m_OnConnect = pLS->m_OnConnect ; m_appFn = pLS->m_appFn ; m_pSSL = pSSL ; m_pLog = pLS->GetLogger() ; Oxygen() ; m_bState = CLIENT_INITIALIZED ; if (pLS->Opflags() & HZ_LISTEN_HTTP) m_pEventHdl = (void*) new hzHttpEvent(m_Input, this) ; return E_OK ; }