C# Class Mycroft.Server.TcpServer

Starts Mycroft's network communications and owns resources in the server
Inheritance: ICommandable
显示文件 Open project: rit-sse-mycroft/core Class Usage Examples

Public Methods

Method Description
Issue ( Command command ) : void

Allow the server to be visited by commands

Start ( ) : void

Starts the server listening for network connections

Stop ( ) : void
TcpServer ( IPAddress ip, int port ) : System

Protected Methods

Method Description
CreateConnection ( TcpClient client ) : CommandConnection

Creates a connection object from a TcpClient

Private Methods

Method Description
Listen ( object pars ) : void
OnClientConnected ( object connection ) : void

Handle clients connecting to the server by creating an AppInstance for the connection

Method Details

CreateConnection() protected method

Creates a connection object from a TcpClient
protected CreateConnection ( TcpClient client ) : CommandConnection
client System.Net.Sockets.TcpClient
return Mycroft.App.CommandConnection

Issue() public method

Allow the server to be visited by commands
public Issue ( Command command ) : void
command Mycroft.Cmd.Command The command that will operate on the server
return void

Start() public method

Starts the server listening for network connections
public Start ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void

TcpServer() public method

public TcpServer ( IPAddress ip, int port ) : System
ip System.Net.IPAddress
port int
return System