| CSpoofSocket:: Sniff() |

Public Function | Declared in: SpoofSocket.h

## Declaration

    virtual BOOL Sniff(
        BOOL bSniff);

## Description

Turn to be a sniffer socket

## Function Body

    //Start sniffing
    if (!ValidSocket())
        return FALSE;

    try
    {
    #ifdef WIN32
        unsigned long ulBytes;
        if (WSAIoctl(GetHandle(),SIO_RCVALL,&bSniff,sizeof(bSniff),NULL,0,&ulBytes,NULL,NULL))
        {
            //Error
            SetLastError("Sniff");
            return FALSE;
        }

        return TRUE;
    #else
        return FALSE;
    #endif
    }
    ERROR_HANDLER_RETURN("Sniff",FALSE)

## See Also

Class Overview | CSpoofBase | Hierarchy Chart

This web site was generated using Surveyor V4.50.811.1. Click here for more information. | Site content copyright © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001.