* * Copyright 2017 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
To read a response from a net.Conn, http.ReadResponse() takes a bufio.Reader. It's possible that this reader reads more than what's need for the response and stores those bytes in the buffer. bufConn wraps the original net.Conn and the bufio.Reader to make sure we don't lose the bytes in the buffer.
newProxyDialer returns a dialer that connects to proxy first if necessary. The returned dialer checks if a proxy is necessary, dial to the proxy with the provided dialer, does HTTP CONNECT handshake and returns the connection.
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.