void OsclSocketServI::Close(bool aCleanup)
{
    //Close oscl socket server

    if (iServState == ESocketServ_Connected)
    {
        StopServImp();
    }

#if PV_SOCKET_SERVER_SELECT_LOOPBACK_SOCKET
    iLoopbackSocket.Cleanup();
#endif

#ifdef OsclSocketCleanup
    //close the socket system
    if (aCleanup)
    {
        bool ok;
        OsclSocketCleanup(ok);
    }
#endif//OsclSocketCleanup

    DUMP_STATS;

#if (PV_SOCKET_SERVI_STATS)
    if (iServiStats)
    {
        LONG_END_SERVI_STATS(EServiSession_All);
        PVServiStats::ShowSummaryStats(iServiStats);
        PVServiStats::Destroy(iServiStats);
        iServiStats = NULL;
    }
#endif
}
void OsclSocketServI::Close(bool aCleanup)
{
    //Close oscl socket server

    if (iServState == ESocketServ_Connected)
    {
        StopServImp();
    }

    iLoopbackSocket.Cleanup();

#ifdef OsclSocketCleanup
    //close the socket system
    if (aCleanup)
    {
        bool ok;
        OsclSocketCleanup(ok);
    }
#endif//OsclSocketCleanup

    DUMP_STATS;
}