Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DataStore = tunnelDataStore{}
Used to store all active tunnels information
Functions ¶
Types ¶
type HandshakeHelper ¶
type HandshakeHelper struct { // The function used to process handshake, the handshake processes // are different between server endpoint and client endpoint. Handshakefunc handshakefunc `json:"-"` TokenSource *token.TokenSourcePlugin TokenParser *token.TokenParserPlugin // The data will send to remote endpoint. In client // endpoit, this means 'token'; In server endpoint, // this means ack message. SendData []byte // Used to store the data receive from remote endpoint. In // server endpoint, this store the 'token'; In client endpoint, // this store the ack message. ReceiveData string }
func NewHandshakeHelper ¶
func NewHandshakeHelper(length int, hsf handshakefunc) HandshakeHelper
func (*HandshakeHelper) SetSendData ¶
func (h *HandshakeHelper) SetSendData(data []byte)
Set the data which will be send to remote endpoint. For client endpoint, this means set a token; for server endpoint, this means set a ack message.
Click to show internal directories.
Click to hide internal directories.