enumhandel方法,用:Programmatic Access to Performance Data: The PHD Class
The class has two constructors:PHD(char **ppc, int nc,char *fileName=NULL,bool addDate=false, 
    bool logState=false);
PHD(char *fileName=NULL,bool addDate=false, bool logState=false); The parameters are: ppc 
The array of counters we want to monitor.nc 
The number of counters you are passing with ppc.fileName 
The name of the file to create.addDate 
A true value will append the current date to fileName.logState 
A true value will log the internal state of the PHD object. This is useful for debugging.

解决方案 »

  1.   

    不是可以知道什么时候调用Accept吗?如果是非法连接,Accept后就把相应的Socket关掉
      

  2.   

    int getpeername(
      SOCKET s,                    
      struct sockaddr FAR *name,  
      int FAR *namelen            
    );
    WSAENOTSOCK The descriptor is not a socket. 一般来说s在[100 - 10000]
    看看它是不是HSOCKET然后closesocket或者closehandle