Document about flags of spdylay_send_callback and spdylay_recv_callback

This commit is contained in:
Tatsuhiro Tsujikawa 2013-03-01 21:01:45 +09:00
parent eddd48b783
commit fc0cfc7faf
1 changed files with 12 additions and 11 deletions

View File

@ -826,11 +826,11 @@ typedef union {
* *
* Callback function invoked when |session| wants to send data to the * Callback function invoked when |session| wants to send data to the
* remote peer. The implementation of this function must send at most * remote peer. The implementation of this function must send at most
* |length| bytes of data stored in |data|. It must return the number * |length| bytes of data stored in |data|. The |flags| is currently
* of bytes sent if it succeeds. If it cannot send any single byte * not used and always 0. It must return the number of bytes sent if
* without blocking, it must return * it succeeds. If it cannot send any single byte without blocking,
* :enum:`SPDYLAY_ERR_WOULDBLOCK`. For other errors, it must return * it must return :enum:`SPDYLAY_ERR_WOULDBLOCK`. For other errors, it
* :enum:`SPDYLAY_ERR_CALLBACK_FAILURE`. * must return :enum:`SPDYLAY_ERR_CALLBACK_FAILURE`.
*/ */
typedef ssize_t (*spdylay_send_callback) typedef ssize_t (*spdylay_send_callback)
(spdylay_session *session, (spdylay_session *session,
@ -841,12 +841,13 @@ typedef ssize_t (*spdylay_send_callback)
* *
* Callback function invoked when |session| wants to receive data from * Callback function invoked when |session| wants to receive data from
* the remote peer. The implementation of this function must read at * the remote peer. The implementation of this function must read at
* most |length| bytes of data and store it in |buf|. It must return * most |length| bytes of data and store it in |buf|. The |flags| is
* the number of bytes written in |buf| if it succeeds. If it cannot * currently not used and always 0. It must return the number of bytes
* read any single byte without blocking, it must return * written in |buf| if it succeeds. If it cannot read any single byte
* :enum:`SPDYLAY_ERR_WOULDBLOCK`. If it gets EOF before it reads any * without blocking, it must return :enum:`SPDYLAY_ERR_WOULDBLOCK`. If
* single byte, it must return :enum:`SPDYLAY_ERR_EOF`. For other * it gets EOF before it reads any single byte, it must return
* errors, it must return :enum:`SPDYLAY_ERR_CALLBACK_FAILURE`. * :enum:`SPDYLAY_ERR_EOF`. For other errors, it must return
* :enum:`SPDYLAY_ERR_CALLBACK_FAILURE`.
*/ */
typedef ssize_t (*spdylay_recv_callback) typedef ssize_t (*spdylay_recv_callback)
(spdylay_session *session, (spdylay_session *session,