Sent by connection handler in response to illegal message. The status is set to CLIENT_BAD but the socket is still made ready for epoll write events. As soon as the socket is available for writes however, the connection is terminated and deleted. The client recieves no response to their request. Arguments: None Returns: None

Return TypeFunction nameArguments
voidhzIpConnex::SendKill(void)

Declared in file: hzIpServer.h
Defined in file : hzIpServer.cpp

Function Logic:

0:START 1:items m_nExpected 2:unknown 3:items 4:m_nsSendBeg m_bState epEventDead EPOLLOUT epEventDead 5:unknown 6:items 7:items 8: No text

Function body:

void hzIpConnex::SendKill (void)
{
   //  Sent by connection handler in response to illegal message. The status is set to CLIENT_BAD but the socket is still made ready for epoll write events. As soon as the socket
   //  is available for writes however, the connection is terminated and deleted. The client recieves no response to their request.
   //  
   //  Arguments: None
   //  Returns: None
   _hzfunc("hzIpConnex::SendKill") ;
   struct epoll_event  epEventDead ;       //  Epoll event for depricated connection
   m_Input.Clear() ;
   m_nExpected = 0;
   if (m_Outgoing.Size())
       m_Outgoing.Clear() ;
   m_nsSendBeg = RealtimeNano() ;
   m_bState |= CLIENT_BAD ;
   epEventDead.data.fd = m_nSock ;
   epEventDead.events = EPOLLOUT | EPOLLET ;
   if (epoll_ctl(s_pTheOneAndOnlyServer->s_epollSocket, EPOLL_CTL_MOD, m_nSock, &epEventDead) < 0)
       m_pLog->Log("%s: EPOLL ERROR: Could not add client connection write handler on sock %d/%d. Error=%s\n", *_fn, m_nSock, m_nPort, strerror(errno)) ;
   else
       m_pLog->Log("%s: BAD CLIENT: Connection killed by app. Sock %d/%d\n", *_fn, m_nSock, m_nPort) ;
   //  if (close(m_nSock) < 0)
   //   m_Track.Printf("%s: NOTE: Could not close socket %d after epoll error. errno=%d\n", *_fn, m_nSock, errno) ;
}