| 69 | } |
| 70 | |
| 71 | void |
| 72 | Http2ServerSession::start() |
| 73 | { |
| 74 | SCOPED_MUTEX_LOCK(lock, this->mutex, this_ethread()); |
| 75 | |
| 76 | SET_HANDLER(&Http2ServerSession::main_event_handler); |
| 77 | HTTP2_SET_SESSION_HANDLER(&Http2ServerSession::state_start_frame_read); |
| 78 | |
| 79 | VIO *read_vio = this->do_io_read(this, INT64_MAX, this->read_buffer); |
| 80 | write_vio = this->do_io_write(this, INT64_MAX, this->_write_buffer_reader); |
| 81 | |
| 82 | this->connection_state.init(this); |
| 83 | |
| 84 | // 3.5 HTTP/2 Connection Preface. Upon establishment of a TCP connection and |
| 85 | // determination that HTTP/2 will be used by both peers, each endpoint MUST |
| 86 | // send a connection preface as a final confirmation ... |
| 87 | // This is the preface string sent by the client |
| 88 | this->write_buffer->write(HTTP2_CONNECTION_PREFACE, HTTP2_CONNECTION_PREFACE_LEN); |
| 89 | write_reenable(); |
| 90 | this->connection_state.send_connection_preface(); |
| 91 | Http2SsnDebug("Sent Connection Preface"); |
| 92 | |
| 93 | this->handleEvent(VC_EVENT_READ_READY, read_vio); |
| 94 | } |
| 95 | |
| 96 | void |
| 97 | Http2ServerSession::new_connection(NetVConnection *new_vc, MIOBuffer *iobuf, IOBufferReader *reader) |
no test coverage detected