Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func Connect ¶
Connect creates a new Client and connects to a Tunnel server. You must call Stop method when the client is no longer needed (to gracefully wait for the internal routines to finish).
Internally the Client is going to keep the connection with the server active (by retrying to connect with the Tunnel server if the connection is lost).
func (*Client) CreateBTunnel ¶
CreateBTunnel asks the server to create a new Broadcast Tunnel. Returns an error if the name is invalid or if the server nack the request.
func (*Client) ListenTunnel ¶
ListenTunnel makes the client listening for the given Tunnel's name messages. When a message is received, the callback function is invoked.
func (*Client) PublishMessage ¶
PublishMessage publishes the given message to the given Tunnel. Returns an error if the server doesn't accept the message.