httplib_websocket_write( conn, opcode, data, data_len );
||Connection on which the data must be written|
||Data to be written to the client|
||Length of the data|
||Number of bytes written or an error code|
httplib_websocket_write() sends data to a websocket client wrapped in a websocket frame. The function issues calls to
httplib_unlock_connaction() to ensure that the transmission is not interrupted. Data corruption can otherwise happn if the application is proactively communicating and responding to a request simultaneously.
The function is available only when LibHTTP is compiled with the
The function returns the number of bytes written, 0 when the connection has been closed and -1 if an error occured.