TRANSMIT_PACKETS_ELEMENT structure (mswsock.h)
The TRANSMIT_PACKETS_ELEMENT structure specifies a single data element to be transmitted by the TransmitPackets function.
Syntax
typedef struct _TRANSMIT_PACKETS_ELEMENT {
ULONG dwElFlags;
ULONG cLength;
union {
struct {
LARGE_INTEGER nFileOffset;
HANDLE hFile;
};
PVOID pBuffer;
};
} TRANSMIT_PACKETS_ELEMENT, *PTRANSMIT_PACKETS_ELEMENT, *LPTRANSMIT_PACKETS_ELEMENT;
Members
dwElFlags
Type: ULONG
Flags used to describe the contents of the packet array element, and to customize TransmitPackets function processing. The following table lists valid flags:
Flag | Meaning |
---|---|
|
Specifies that data resides in a file. Default setting for dwElFlags. Mutually exclusive with TP_ELEMENT_MEMORY. |
|
Specifies that data resides in memory. Mutually exclusive with TP_ELEMENT_FILE. |
|
Specifies that this element should not be combined with the next element in a single send request from the sockets layer to the transport. This flag is used for granular control of the content of each message on a datagram or message-oriented socket. |
cLength
Type: ULONG
The number of bytes to transmit. If zero, the entire file is transmitted.
nFileOffset
Type: LARGE_INTEGER
The file offset, in bytes, at which to begin the transfer. Valid only if TP_ELEMENT_FILE is specified in dwEIFlags. When set to –1, transmission begins at the current byte offset.
hFile
Type: HANDLE
A handle to an open file to be transmitted. Valid only if TP_ELEMENT_FILE is specified in dwEIFlags. Windows reads the file sequentially; caching performance is improved by opening this handle with FILE_FLAG_SEQUENTIAL_SCAN.
pBuffer
Type: PVOID
A pointer to the data in memory to be sent. Valid only if TP_ELEMENT_MEMORY is specified in dwEIFlags.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | mswsock.h |
See also
send