Documentation ¶
Index ¶
- func DialRelayed(network, myID, peerId, relayAddress string) (net.Conn, error)
- func StartServerMode(myKey string, port int)
- type Client
- type ClientManager
- type RelayConn
- func (this RelayConn) Close() error
- func (this RelayConn) LocalAddr() net.Addr
- func (this RelayConn) Read(b []byte) (n int, err error)
- func (this RelayConn) RemoteAddr() net.Addr
- func (this RelayConn) SetDeadline(t time.Time) error
- func (this RelayConn) SetReadDeadline(t time.Time) error
- func (this RelayConn) SetWriteDeadline(t time.Time) error
- func (this RelayConn) Write(b []byte) (n int, err error)
- type RelayManager
- type RelayMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartServerMode ¶
Types ¶
type ClientManager ¶
type ClientManager struct {
// contains filtered or unexported fields
}
type RelayConn ¶
func (RelayConn) RemoteAddr ¶
type RelayManager ¶
type RelayManager struct { MyId string RelayConnections map[string]*net.Conn //the key can be the address or maybe we should get an Id from the relay. ClientConnections map[string]*RelayConn }
Singleton object to keep a list of all connected relays. each relay can have a connection to more than one peer so the tcp connection will be reused.
Click to show internal directories.
Click to hide internal directories.