GetClientSessionInfo function
The GetClientSessionInfo function will return information about the remote- or local address used by the clientsession.Syntax
int __stdcall GetClientSessionInfo(
__in ProtocolSession *psess,
__in ClientSession *sess,
__in int type,
__out void* buf,
__inout int* len
);
Parameters
psess [in] A pointer to a ProtocolSession structure. This is a session assigned to a protocol at the moment it's loaded into the memory.
sess [in] A pointer to a ClientSession structure. This is a session assigned to a new connection. This connection has been created by a type PT_RECEIVER protocol.
type [in] This parameter is a combination of flags and an enumeration. This parameter can be one of the following values. Plugins are allowed to define their own specific type between the range 0x7FFF and 0xFFFF.
Value | Meaning |
CSI_CLIENT_ADDRESS 0 | The return information on parameter buf will be the remote address of the client.
|
CSI_CLIENT_PORT 1 | The return information on parameter buf will be the remote port of the client.
|
CSI_LOCAL_ADDRESS 2 | The return information on parameter buf will be the local address.
|
CSI_LOCAL_PORT 3 | The return information on parameter buf will be the local port.
|
CSI_CONNECTION_ALIVE 4 | The return information on parameter buf will be a boolean that indicates if the connection is still alive.
|
And this parameter can be a combination of the following values, in combination with the previous values.
Value | Meaning |
CSI_RAW_DATA 0x20000 | Set this flag will make the function return raw data on parameter buf.
|
buf [out] A pointer to the buffer to receive the data specified in parameter Type. This paramter can be zero.
len [inout] A pointer to the length, in bytes, of the buffer pointed to by the buf parameter. If buf parameter is zero or the buffer is to small, this parameter will receive the length needed to receive the data.
Return value
If no error occurs the function returns True (one). If the function fails it will return False (zero).
Requirements
Should be exported by | Receiver and Transformer plugin.
|
Minimum supported API | 1.00
|
Header | tvsserver_base.h
|