• About TV's server
  • New in version 3.10
  • About the source code
  • About protocols/plugins
  • TV's server API
  • Protocol Initialisation
  • Protocol binding
  • Protocol Listening and handling
  • Protocol data storage
  • Control panel
  • Multi column list
  • Time and date
  • Http protocol functions
  • Unimplemented and/or replaced functions
  • SendData function

    The SendData function prepares and sends data to the client.

    Syntax

    int __stdcall SendData(
    __in ProtocolSession *psess,
    __in ClientSession *sess,
    __in int flags,
    __in int timeout,
    __in char *buf,
    __inout int *len
    );

    Parameters

    psess [in]sess [in]flags [in]
    ValueMeaning
    RSF_RETURN_ON_COMPLETE
    0x0
    The function will return when the operation is completed or when the connection has been lost. If this flag is used on the RecvData Function, 'operation is completed' means it will return when the number of bytes have been received or when the timeout has been reached.
    RSF_RETURN_ON_ERROR
    0x1
    The function will return when the first attempt failed or succeed, it will not try to resolve any error.

    timeout [in]buf [in]len [inout]

    Return value

    This can be one of the following values:

    ValueMeaning
    CE_NOERR
    0
    No error.
    CE_NO_BUFFER_AVAILABLE
    1
    There is not enough free space available in the internal buffer.
    CE_CONNECTION_CLOSED
    2
    Cannot complete the request because the connection with the client has been closed.
    CE_UNKNOWN_ERROR
    3
    An error occurred and since the RSF_RETURN_ON_ERROR flag is set the function returns.
    CE_TIMEOUT
    4
    A timeout has occurred.

    Requirements

    Should be exported by Receiver
    and Transformer plugin.
    Minimum supported API 1.00
    Header tvsserver_base
    .h