Exposed spdylay_session_fail_session() to the public API.
This commit is contained in:
parent
ab0bd62b14
commit
94650de16e
|
@ -1430,6 +1430,25 @@ size_t spdylay_session_get_outbound_queue_size(spdylay_session *session);
|
|||
*/
|
||||
uint8_t spdylay_session_get_pri_lowest(spdylay_session *session);
|
||||
|
||||
/*
|
||||
* @function
|
||||
*
|
||||
* Submits GOAWAY frame. The status code |status_code| is ignored if
|
||||
* the protocol version is :macro:`SPDYLAY_PROTO_SPDY2`.
|
||||
*
|
||||
* This function should be called when the connection should be
|
||||
* terminated after sending GOAWAY. If the remaining streams should be
|
||||
* processed after GOAWAY, use `spdylay_submit_goaway()` instead.
|
||||
*
|
||||
* This function returns 0 if it succeeds, or one of the following
|
||||
* negative error codes:
|
||||
*
|
||||
* :enum:`SPDYLAY_ERR_NOMEM`
|
||||
* Out of memory.
|
||||
*/
|
||||
int spdylay_session_fail_session(spdylay_session *session,
|
||||
uint32_t status_code);
|
||||
|
||||
/**
|
||||
* @function
|
||||
*
|
||||
|
|
|
@ -63,13 +63,8 @@ static int spdylay_is_fatal(int error)
|
|||
return error < SPDYLAY_ERR_FATAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* This function should be called when the session wants to drop
|
||||
* connection after sending GOAWAY. These cases are called as the
|
||||
* session error. For example, when it receives bad zlib data.
|
||||
*/
|
||||
static int spdylay_session_fail_session(spdylay_session *session,
|
||||
uint32_t status_code)
|
||||
int spdylay_session_fail_session(spdylay_session *session,
|
||||
uint32_t status_code)
|
||||
{
|
||||
session->goaway_flags |= SPDYLAY_GOAWAY_FAIL_ON_SEND;
|
||||
return spdylay_submit_goaway(session, status_code);
|
||||
|
|
Loading…
Reference in New Issue