Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Communicator ¶
func New ¶
func New(fileName string) *Communicator
func (*Communicator) ReadMessage ¶
func (c *Communicator) ReadMessage() (messageType int, p []byte, err error)
ReadMessage acts as the function that would receive data from the front end.
func (*Communicator) WriteMessage ¶
func (c *Communicator) WriteMessage(messageType int, data []byte) error
WriteMessage acts as the function that would send data to the front end.
type MockCommunicator ¶
func NewMock ¶
func NewMock() *MockCommunicator
func (*MockCommunicator) Close ¶
func (mc *MockCommunicator) Close() error
func (*MockCommunicator) ReadMessage ¶
func (mc *MockCommunicator) ReadMessage() (int, []byte, error)
func (*MockCommunicator) WriteMessage ¶
func (mc *MockCommunicator) WriteMessage(messageType int, data []byte) error
Click to show internal directories.
Click to hide internal directories.