Accept Method of the IFWXNetworkSocket Interface

The Accept method asynchronously permits a connection on a listening socket. This method is similar to the Winsock accept function.

Syntax

HRESULT Accept(
  [in]  IFWXAcceptCompletion* pIFWXAcceptCompletion,
  [in]  UserContextType UserData
);

Parameters

pIFWXAcceptCompletion

Pointer to an IFWXAcceptCompletion interface, whose CompleteAsyncAccept method is called to receive a notification when the accept operation is completed.

UserData

An opaque value that is to be passed to the IFWXAcceptCompletion::CompleteAsyncAccept notification method. This parameter provides a context to the notification.

Return Value

This method returns S_OK if the call is successful; otherwise, it returns an error code.

For an IFWXNetworkSocket interface created by a call to IFWXFirewall2::CreateSSLNetworkSocket, this method returns E_NOTIMPL.

Remarks

The UserData parameter provides a context to the notification. You can use the same notification interface for receiving completion notifications from different network socket objects and differentiate between them by using different values for UserData.

Requirements

Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
Header

Declared in Wspfwext.idl.

DLL

Requires Wspsrv.exe.

See Also

IFWXNetworkSocket


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.