socket reuse

int k   =   1;
    if( SUCCESS != m_socketServer.setSockOptSocket( SO_REUSEADDR, (char*)&k, sizeof(k), SOL_SOCKET ) ) {
        PRINT("setSockOptSocket SO_REUSEADDR error\n");
    }

linger  m_sLinger;
    m_sLinger.l_onoff   =   1;
    m_sLinger.l_linger  =   0;
    if( SUCCESS != m_socketServer.setSockOptSocket( SO_LINGER, (char*)&m_sLinger, sizeof(m_sLinger), SOL_SOCKET ) ) {
        PRINT("setSockOptSocket SO_LINGER error\n");
    }

上一篇:沈逸老师PHP魔鬼特训笔记(1)


下一篇:《MATLAB图像处理375例》——1.2 数字图像处理的研究内容