public void CloseSocket() { if (null == m_scH) { return; } lock (m_oLock) { m_scH.Shutdown(SocketShutdown.Both); m_scH.Close(); m_scH = null; m_sdH = null; m_sIp = ""; m_sPt = 0; m_sndC = NTC.OK; m_sndN = -1; for (int n = 0; n < m_sndB.Count; ++n) { Array.Clear(m_sndB[n], 0, m_sndB[n].Length); } } if (null != m_pPrn) { TcpBase p = (TcpBase)m_pPrn; p.Query("Remove Client", this); } }
public void CloseSocket() { if (null == m_scH) { return; } lock (m_oLock) { m_arCon = null; m_arRcv = null; m_arSnd = null; m_scH.Shutdown(SocketShutdown.Both); m_scH.Close(); m_scH = null; m_sdH = null; m_sIp = ""; m_sPt = 0; } if (null != m_pPrn) { TcpBase p = (TcpBase)m_pPrn; p.Query("Remove Client", this); } }