Documentation
¶
Index ¶
- func BuildSocketChannelCreatePacket(source ChannelMember, sink ChannelMember, rule ForwardingRule) (*proxy.Packet, string, error)
- func NewCriticalErrorPacket(err error) *proxy.Packet
- func NewDisconnectSocketChannelPacket(id string) (*proxy.Packet, error)
- func NewErrorPacket(err error) *proxy.Packet
- type ChannelMember
- type ChannelStateInfo
- type CreateSocketChannelPacket
- type DisconnectSocketChannelPacket
- type ForwardingRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSocketChannelCreatePacket ¶
func BuildSocketChannelCreatePacket(source ChannelMember, sink ChannelMember, rule ForwardingRule) (*proxy.Packet, string, error)
BuildSocketChannelCreatePacket builds a new packet for creating a socket channel The client sends this to the proxy server to request a new socket channel be setup to link the source and sink @param source: the source channel member @param sink: the sink channel member @param rule: the forwarding rule to use for the channel @return: the new packet, the request id, and an error if one occurred
func NewCriticalErrorPacket ¶
func NewDisconnectSocketChannelPacket ¶
NewDisconnectSocketChannelPacket creates a new packet for disconnecting a socket channel The client sends this to the proxy server to request a socket channel be disconnected @param id: the id of the channel to disconnect @return: the new packet or an error if one occurred
func NewErrorPacket ¶
Types ¶
type ChannelMember ¶
type ChannelMember struct { Id uuid.UUID Name string ForwardingRules []*ForwardingRule }
Member of a channel. Used to keep track of who is in the channel and where messages can be sent.
func NewChannelMember ¶
func NewChannelMember(name string) *ChannelMember
NewChannelMember creates a new channel member @param name: the name of the channel member
type ChannelStateInfo ¶
type ChannelStateInfo struct { YourId uuid.UUID CurrentMembers []*ChannelMember }
type CreateSocketChannelPacket ¶
type CreateSocketChannelPacket struct { Id string RequestId string Source ChannelMember Sink ChannelMember ForwardingRule ForwardingRule }
type DisconnectSocketChannelPacket ¶
type DisconnectSocketChannelPacket struct { // channel id to disconnect Id string }
type ForwardingRule ¶
type ForwardingRule struct { LocalPort int RemoteClient string RemoteHost string RemotePort int // if based on the current state of the channel this rule is Valid Valid bool }
func NewForwardingRuleFromArg ¶
func NewForwardingRuleFromArg(arg string) *ForwardingRule
NewForwardingRuleFromArg creates a new forwarding rule