C# Class POLUtils.AuxSvc.AuxSvcConnection

Provides a stream that implements the AuxSvc protocol.
Afficher le fichier Open project: polserver/poltools Class Usage Examples

Méthodes publiques

Méthode Description
AuxSvcConnection ( string server_ip, int server_port ) : System.IO

Creates an AuxSvc object against the specified socket to designated Server IP and Server Port. It then initializes and connects the AuxSocket and uses the AuxSocket to initialize the AuxStream for our Read/Write work.

Close ( ) : void

Closes all AuxSvcConnection related Streams. Can be used to manually kill an AuxSvcConnection if an error is encountered before using Write(). Will result in the AuxSvc Script in POL to exit the While(connection) Loop and terminate.

Read ( ) : string

Returns the current contents of the AuxStream in string format.

Write ( string input ) : bool

Attempts to send a string using the AuxWriter Stream. Returns a bool for success.

Private Methods

Méthode Description
AuxSvcConnection ( ) : System.IO

The default constructor is marked as private to ensure the parameterized constructor is called.

Method Details

AuxSvcConnection() public méthode

Creates an AuxSvc object against the specified socket to designated Server IP and Server Port. It then initializes and connects the AuxSocket and uses the AuxSocket to initialize the AuxStream for our Read/Write work.
public AuxSvcConnection ( string server_ip, int server_port ) : System.IO
server_ip string /// The ip that the AuxSvcStream will try to connect to. ///
server_port int /// The port that the AuxSvcStream will try to connect to. ///
Résultat System.IO

Close() public méthode

Closes all AuxSvcConnection related Streams. Can be used to manually kill an AuxSvcConnection if an error is encountered before using Write(). Will result in the AuxSvc Script in POL to exit the While(connection) Loop and terminate.
public Close ( ) : void
Résultat void

Read() public méthode

Returns the current contents of the AuxStream in string format.
public Read ( ) : string
Résultat string

Write() public méthode

Attempts to send a string using the AuxWriter Stream. Returns a bool for success.
public Write ( string input ) : bool
input string /// The POL Style Packed string to send to the POL Server. ///
Résultat bool