Documentation ¶
Overview ¶
server provides the server end of packetforward functionality. The server reads IP packets from the client's connection, forwards these to the final origin using gonat and writes response packets back to the client.
Index ¶
Constants ¶
View Source
const ( // DefaultBufferPoolSize is 1MB DefaultBufferPoolSize = 1000000 // DefaultReadBufferSize is gonat.MaximumIPPacketSize DefaultReadBufferSize = gonat.MaximumIPPacketSize )
Variables ¶
View Source
var ( // ErrNoConnection means that we attempted to write to client for which we have no current connection ErrNoConnection = errors.New("no client connection") )
Functions ¶
This section is empty.
Types ¶
type Opts ¶
type Opts struct { gonat.Opts // BufferPoolSize is the size of the buffer pool in bytes. If not specified, defaults to 1 MB BufferPoolSize int // ReadBufferSize is the size of the read buffer for reading framed packets from clients. If not specified, defaults to gonat.MaximumIPPacketSize ReadBufferSize int }
Click to show internal directories.
Click to hide internal directories.