| 141 | } |
| 142 | |
| 143 | type quicState struct { |
| 144 | events []QUICEvent |
| 145 | nextEvent int |
| 146 | |
| 147 | // eventArr is a statically allocated event array, large enough to handle |
| 148 | // the usual maximum number of events resulting from a single call: transport |
| 149 | // parameters, Initial data, Early read secret, Handshake write and read |
| 150 | // secrets, Handshake data, Application write secret, Application data. |
| 151 | eventArr [8]QUICEvent |
| 152 | |
| 153 | started bool |
| 154 | signalc chan struct{} // handshake data is available to be read |
| 155 | blockedc chan struct{} // handshake is waiting for data, closed when done |
| 156 | cancelc <-chan struct{} // handshake has been canceled |
| 157 | cancel context.CancelFunc |
| 158 | |
| 159 | waitingForDrain bool |
| 160 | |
| 161 | // readbuf is shared between HandleData and the handshake goroutine. |
| 162 | // HandshakeCryptoData passes ownership to the handshake goroutine by |
| 163 | // reading from signalc, and reclaims ownership by reading from blockedc. |
| 164 | readbuf []byte |
| 165 | |
| 166 | transportParams []byte // to send to the peer |
| 167 | |
| 168 | enableSessionEvents bool |
| 169 | } |
| 170 | |
| 171 | // QUICClient returns a new TLS client side connection using QUICTransport as the |
| 172 | // underlying transport. The config cannot be nil. |
nothing calls this directly
no outgoing calls
no test coverage detected