Documentation ¶
Overview ¶
Package tunnel implements the tunneling logic for copying data between two network connections both sides.
Index ¶
Constants ¶
View Source
const MaxMessageLength = 1280
MaxMessageLength is the maximum length that is safe to use. TODO(ameshkov): Make it configurable.
View Source
const MinMessageLength = 100
MinMessageLength is the minimum message size. If the message is smaller, it will be padded with random bytes.
Variables ¶
This section is empty.
Functions ¶
func Tunnel ¶
func Tunnel(pipeName string, left io.ReadWriter, right io.ReadWriter)
Tunnel passes data between two connections.
Types ¶
type MsgReadWriter ¶
type MsgReadWriter struct {
// contains filtered or unexported fields
}
MsgReadWriter is a wrapper over io.ReadWriter that encodes messages written to and read from the base writer.
func NewMsgReadWriter ¶
func NewMsgReadWriter(base io.ReadWriter) (rw *MsgReadWriter)
NewMsgReadWriter creates a new instance of *MsgReadWriter.
Click to show internal directories.
Click to hide internal directories.