Lines Matching defs:http2serverConn
4422 type http2serverConn struct { struct
4424 srv *http2Server
4425 hs *Server
4426 conn net.Conn
4427 bw *http2bufferedWriter // writing to conn
4428 handler Handler
4429 baseCtx context.Context
4430 framer *http2Framer
4431 doneServing chan struct{} // closed when serverConn.serve ends
4432 readFrameCh chan http2readFrameResult // written by serverConn.readFrames
4433 wantWriteFrameCh chan http2FrameWriteRequest // from handlers -> serve
4434 …FrameCh chan http2frameWriteResult // from writeFrameAsync -> serve, tickles more frame writes
4435 bodyReadCh chan http2bodyReadMsg // from handlers -> serve
4436 …eMsgCh chan interface{} // misc messages & code to send to / run on the serve loop
4437 …ow http2outflow // conn-wide (not stream-specific) outbound flow control
4438 inflow http2inflow // conn-wide inbound flow control
4439 tlsState *tls.ConnectionState // shared by all handlers, like net/http
4440 remoteAddrStr string
4441 writeSched http2WriteScheduler
4444 serveG http2goroutineLock // used to verify funcs are on serve()
4445 pushEnabled bool
4446 sawClientPreface bool // preface has already been read, used in h2c upgrade
4447 sawFirstSettings bool // got the initial SETTINGS frame after the preface
4448 needToSendSettingsAck bool
4449 unackedSettings int // how many SETTINGS have we sent without ACKs?
4450 queuedControlFrames int // control frames in the writeSched queue
4451 …axStreams uint32 // SETTINGS_MAX_CONCURRENT_STREAMS from client (our PUSH_PROMISE limit)
4452 advMaxStreams uint32 // our SETTINGS_MAX_CONCURRENT_STREAMS advertised the client
4453 curClientStreams uint32 // number of open streams initiated by the client
4454 curPushedStreams uint32 // number of open streams initiated by server push
4455 curHandlers uint32 // number of running handler goroutines
4456 …mID uint32 // max ever seen from client (odd), or 0 if there have been no client requests
4457 …romiseID uint32 // ID of the last push promise (even), or 0 if there have been no pushes
4458 streams map[uint32]*http2stream
4459 unstartedHandlers []http2unstartedHandler
4460 initialStreamSendWindowSize int32
4461 maxFrameSize int32
4462 peerMaxHeaderListSize uint32 // zero means unknown (default)
4463 canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case
4464 canonHeaderKeysSize int // canonHeader keys size in bytes
4465 …gFrame bool // started writing a frame (on serve goroutine or separate)
4466 … bool // started a frame on its own goroutine but haven't heard back on wroteFrameCh
4467 needsFrameFlush bool // last frame write wasn't a flush
4468 inGoAway bool // we've started to or sent GOAWAY
4469 inFrameScheduleLoop bool // whether we're in the scheduleFrameWrite loop
4470 needToSendGoAway bool // we need to schedule a GOAWAY frame write
4471 goAwayCode http2ErrCode
4472 shutdownTimer http2timer // nil until used
4473 idleTimer http2timer // nil if unused
4476 headerWriteBuf bytes.Buffer
4477 hpackEncoder *hpack.Encoder
4480 shutdownOnce sync.Once
4483 func (sc *http2serverConn) maxHeaderListSize() uint32 {
4495 func (sc *http2serverConn) curOpenStreams() uint32 {
4533 func (sc *http2serverConn) Framer() *http2Framer { return sc.framer }
4535 func (sc *http2serverConn) CloseConn() error { return sc.conn.Close() }
4537 func (sc *http2serverConn) Flush() error { return sc.bw.Flush() }
4539 func (sc *http2serverConn) HeaderEncoder() (*hpack.Encoder, *bytes.Buffer) {
4543 func (sc *http2serverConn) state(streamID uint32) (http2streamState, *http2stream) {
4570 func (sc *http2serverConn) setConnState(state ConnState) {
4576 func (sc *http2serverConn) vlogf(format string, args ...interface{}) {
4582 func (sc *http2serverConn) logf(format string, args ...interface{}) {
4630 func (sc *http2serverConn) condlogf(err error, format string, args ...interface{}) {
4649 func (sc *http2serverConn) canonicalHeader(v string) string {
4686 func (sc *http2serverConn) readFrames() {
4719 func (sc *http2serverConn) writeFrameAsync(wr http2FrameWriteRequest, wd *http2writeData) {
4730 func (sc *http2serverConn) closeAllStreamsOnConnClose() {
4737 func (sc *http2serverConn) stopShutdownTimer() {
4744 func (sc *http2serverConn) notePanic() {
4759 func (sc *http2serverConn) serve() {
4902 func (sc *http2serverConn) onSettingsTimer() { sc.sendServeMsg(http2settingsTimerMsg) }
4904 func (sc *http2serverConn) onIdleTimer() { sc.sendServeMsg(http2idleTimerMsg) }
4906 func (sc *http2serverConn) onShutdownTimer() { sc.sendServeMsg(http2shutdownTimerMsg) }
4908 func (sc *http2serverConn) sendServeMsg(msg interface{}) {
4921 func (sc *http2serverConn) readPreface() error {
4962 …sc *http2serverConn) writeDataFromHandler(stream *http2stream, data []byte, endStream bool) error {
5009 func (sc *http2serverConn) writeFrameFromHandler(wr http2FrameWriteRequest) error {
5029 func (sc *http2serverConn) writeFrame(wr http2FrameWriteRequest) {
5093 func (sc *http2serverConn) startFrameWrite(wr http2FrameWriteRequest) {
5150 func (sc *http2serverConn) wroteFrame(res http2frameWriteResult) {
5214 func (sc *http2serverConn) scheduleFrameWrite() {
5262 func (sc *http2serverConn) startGracefulShutdown() {
5285 func (sc *http2serverConn) startGracefulShutdownInternal() {
5289 func (sc *http2serverConn) goAway(code http2ErrCode) {
5303 func (sc *http2serverConn) shutDownIn(d time.Duration) {
5308 func (sc *http2serverConn) resetStream(se http2StreamError) {
5319 func (sc *http2serverConn) processFrameFromReader(res http2readFrameResult) bool {
5376 func (sc *http2serverConn) processFrame(f http2Frame) error {
5429 func (sc *http2serverConn) processPing(f *http2PingFrame) error {
5448 func (sc *http2serverConn) processWindowUpdate(f *http2WindowUpdateFrame) error {
5480 func (sc *http2serverConn) processResetStream(f *http2RSTStreamFrame) error {
5499 func (sc *http2serverConn) closeStream(st *http2stream, err error) {
5546 func (sc *http2serverConn) processSettings(f *http2SettingsFrame) error {
5574 func (sc *http2serverConn) processSetting(s http2Setting) error {
5606 func (sc *http2serverConn) processSettingInitialWindowSize(val uint32) error {
5634 func (sc *http2serverConn) processData(f *http2DataFrame) error {
5731 func (sc *http2serverConn) processGoAway(f *http2GoAwayFrame) error {
5797 func (sc *http2serverConn) processHeaders(f *http2MetaHeadersFrame) error {
5908 func (sc *http2serverConn) upgradeRequest(req *Request) {
5962 func (sc *http2serverConn) checkPriority(streamID uint32, p http2PriorityParam) error {
5973 func (sc *http2serverConn) processPriority(f *http2PriorityFrame) error {
5981 func (sc *http2serverConn) newStream(id, pusherID uint32, state http2streamState) *http2stream {
6017 …iterAndRequest(st *http2stream, f *http2MetaHeadersFrame) (*http2responseWriter, *Request, error) {
6082 …erAndRequestNoBody(st *http2stream, rp http2requestParam) (*http2responseWriter, *Request, error) {
6157 func (sc *http2serverConn) newResponseWriter(st *http2stream, req *Request) *http2responseWriter {
6178 …amID uint32, rw *http2responseWriter, req *Request, handler func(ResponseWriter, *Request)) error {
6198 func (sc *http2serverConn) handlerDone() {
6223 …erConn) runHandler(rw *http2responseWriter, req *Request, handler func(ResponseWriter, *Request)) {
6265 func (sc *http2serverConn) writeHeaders(st *http2stream, headerData *http2writeResHeaders) error {
6297 func (sc *http2serverConn) write100ContinueHeaders(st *http2stream) {
6314 func (sc *http2serverConn) noteBodyReadFromHandler(st *http2stream, n int, err error) {
6324 func (sc *http2serverConn) noteBodyRead(st *http2stream, n int) {
6335 func (sc *http2serverConn) sendWindowUpdate32(st *http2stream, n int32) {
6340 func (sc *http2serverConn) sendWindowUpdate(st *http2stream, n int) {
6991 func (sc *http2serverConn) startPush(msg *http2startPushRequest) {
7135 func (sc *http2serverConn) countError(name string, err error) error {