clientfactory

package
v0.0.0-...-86cadf3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2016 License: MIT Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL