C# Class mybox.ServerClientConnection

Represents a two way connection from the server to a single client
Show file Open project: jonocodes/mybox Class Usage Examples

Public Properties

Property Type Description
User ServerUser

Public Methods

Method Description
SendCatchup ( Signal inputOperation, String arg ) : void

Send catchup operation to the client based on the original inputOperation

ServerClientConnection ( Server server, Socket inClientSocket ) : System
StopListener ( ) : void

Private Methods

Method Description
attachUser ( String userName, String password ) : bool

Attempt to authenticate the client via credentials. If it matches an account on the server return true.

close ( ) : void

Close the connection

handleInput ( Signal signal ) : void

Handle input signals from the client

listenToClient ( ) : void

Listen to the client via threadless async callback

onReceiveSignalComplete ( IAsyncResult iar ) : void

Async callback for client listening

processOutQueue ( ) : void
sendCommandToClient ( Signal signal ) : void

Method Details

SendCatchup() public method

Send catchup operation to the client based on the original inputOperation
public SendCatchup ( Signal inputOperation, String arg ) : void
inputOperation Signal the initial operation for which to determine an output operation
arg String additional arguments for the input/output operation
return void

ServerClientConnection() public method

public ServerClientConnection ( Server server, Socket inClientSocket ) : System
server Server
inClientSocket System.Net.Sockets.Socket
return System

StopListener() public method

public StopListener ( ) : void
return void

Property Details

User public property

public ServerUser,mybox User
return ServerUser