C# Class Mycroft.App.CommandConnection

Show file Open project: rit-sse-mycroft/core Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Closes the underlying connection

CommandConnection ( TcpClient client, Stream input ) : System

Wrap a command connection around a generic input stream

GetCommand ( ) : string
SendMessageAsync ( string message ) : System.Threading.Tasks.Task

Writes a message back to the host

Private Methods

Method Description
GetMsgLen ( ) : int

Method Details

Close() public method

Closes the underlying connection
public Close ( ) : void
return void

CommandConnection() public method

Wrap a command connection around a generic input stream
public CommandConnection ( TcpClient client, Stream input ) : System
client System.Net.Sockets.TcpClient
input Stream The source of all commands
return System

GetCommand() public method

public GetCommand ( ) : string
return string

SendMessageAsync() public method

Writes a message back to the host
public SendMessageAsync ( string message ) : System.Threading.Tasks.Task
message string The message to write, including the message type tag and JSON body
return System.Threading.Tasks.Task