TcSetSocketFlow function
The TcSetSocketFlow function enables a flow on a socket. The socket will use that flow's parameters until a new flow is set on the socket, or the flow is deleted.
ULONG TcSetSocketFlow(
_In_ HANDLE SocketHandle,
_In_ HANDLE FlowHandle
);
SocketHandle [in]
Handle to the socket that will use the flow. A SOCKET may be cast to a HANDLE for this parameter.FlowHandle [in]
A flow handle, as created by TcAddFlow.
The TcSetSocketFlow function has the following return values.
Return code | Description |
---|---|
NO_ERROR | The function executed without errors. |
ERROR_INVALID_HANDLE | FlowHandle is not a valid flow handle. |
ERROR_NOT_ENOUGH_MEMORY | Not enough memory to complete the operation. |
ERROR_INVALID_PARAMETER | Invalid parameter; SocketHandle is not a valid socket handle or FlowHandle is not a valid flow handle |
ERROR_NOT_READY | The flow handle is not in the correct state. |
After creating a flow handle for an interface, use TcSetSocketFlow to associate the flow with a particular socket. The socket will then use the flow parameters specified when the flow was created. The socket used in TcSetSocketFlow must belong to the same network interface as the flow.
After the flow is no longer needed on the socket, call TcSetSocketFlow with NULL as the FlowHandle.
Note Use of the TcSetSocketFlow function requires administrative privilege.
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
Traffic.h |
DLL |
Traffic.dll |