Documentation
¶
Index ¶
- Variables
- func Copy(dst io.Writer, src io.Reader) (written int64, err error)
- func IsFailedToSendCloseNotifyError(err error) bool
- func IsHostResponded(err error) bool
- func IsOKNetworkError(err error) bool
- func IsUseOfClosedNetworkError(err error) bool
- func Pipe(tunnelConn, originConn io.ReadWriteCloser)
- func PipeBidirectional(downstream, upstream Stream) error
- type Reader
- type Stream
- type WriterCloser
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UseOfClosedNetworkConnection is a special string some parts of // go standard lib are using that is the only way to identify some errors UseOfClosedNetworkConnection = "use of closed network connection" // FailedToSendCloseNotify is an error message from Go net package // indicating that the connection was closed by the server. FailedToSendCloseNotify = "tls: failed to send closeNotify alert (but connection was closed anyway)" )
Functions ¶
func IsFailedToSendCloseNotifyError ¶
IsFailedToSendCloseNotifyError returns true if the provided error is the "tls: failed to send closeNotify".
func IsHostResponded ¶
func IsOKNetworkError ¶
IsOKNetworkError returns true if the provided error received from a network operation is one of those that usually indicate normal connection close.
func IsUseOfClosedNetworkError ¶
IsUseOfClosedNetworkError returns true if the specified error indicates the use of a closed network connection.
func Pipe ¶
func Pipe(tunnelConn, originConn io.ReadWriteCloser)
func PipeBidirectional ¶
Types ¶
type Reader ¶
type Reader interface {
io.ReadCloser
}
type Stream ¶
type Stream interface {
Reader
WriterCloser
}
type WriterCloser ¶
type WriterCloser interface {
io.WriteCloser
}
Click to show internal directories.
Click to hide internal directories.