Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KitterCallback ¶
type KitterCallback interface {
NewMessage(message string)
}
KitterCallback allows a method to be called on the native code
type KitterClient ¶
type KitterClient struct {
// contains filtered or unexported fields
}
KitterClient creates a new client that can be used for sending and receiving messages to a Kitter server
func Create ¶
func Create(server string) *KitterClient
NewKitterClient creates a new Kitter client and connets to the given server
func (*KitterClient) Close ¶
func (k *KitterClient) Close()
Close closes the connection to the server
func (*KitterClient) ReadStream ¶
func (k *KitterClient) ReadStream(callback KitterCallback)
ReadStream reads a stream of messages from the kitter server. When a new message is received the NewMessage method is called on the provided callback
func (*KitterClient) WriteMessage ¶
func (k *KitterClient) WriteMessage(message string)
WriteMessage sends a message to the kitter server
Click to show internal directories.
Click to hide internal directories.