C# Class Mycroft.App.CommandConnection

Afficher le fichier Open project: rit-sse-mycroft/core Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
GetMsgLen ( ) : int

Method Details

Close() public méthode

Closes the underlying connection
public Close ( ) : void
Résultat void

CommandConnection() public méthode

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
Résultat System

GetCommand() public méthode

public GetCommand ( ) : string
Résultat string

SendMessageAsync() public méthode

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
Résultat System.Threading.Tasks.Task