Server Reference Guide : HTTP Routing : .NET SerialRemoteServer Interface : Ca.OpenROAD.SerialRemoteServer
 
Share this page          
Ca.OpenROAD.SerialRemoteServer
The .NET SerialRemoteServer class wraps a corresponding instance of the OpenROAD.SerialRemoteServer COM class. This is used only in the HTTP gatekeeper web server application.
The default constructor takes no arguments and creates an underlying COM SerialRemoteServer instance that is not connected.
The following table describes these wrappers:
Wrappers
Description
void Dispose();
Releases the underlying COM SRS instance. After the Dispose method is called, the .NET object instance becomes essentially useless and should be discarded.
void Connect(string akaName, string location, string routing);
Connects the SRS using the NameServer. Both location and routing are optional and can be passed as null references or empty strings.
void AttachRSO(RemoteServer rso);
Allows an existing RSO instance to be used as the underlying RSO for the SRS. The RSO parameter must be a .NET RemoteServer instance that is already connected. There is no transfer of ownership of underlying COM resources. The RSO instance must still have Dispose called on it independently of the SRS.
void Disconnect();
Disconnects the SerialRemoteServer
void PassThruCallProc(string procName, ParameterData byValPDO, ParameterData byRefPDO);
Invokes a CallProc on the underlying RemoteServer instance. Both byValPDO and byRefPDO are optional and can be passed as null references.
bool IsConnected { get; }
Indicates whether the SRS instance is connected
int DecodeMessageType(byte[] message);
Decodes just enough of a request message to determine its type
InitiateRequest DecodeInitiateRequest(byte[] message);
Decodes an InitiateRequest message
Call4GLRequestHeader DecodeCall4GLRequestHeader(byte[] message);
Decodes just the header (authentication token and procedure name) of a Call4GLRequest message
DisconnectRequest DecodeDisconnectRequest(byte[] message);
Decodes a DisconnectRequest message
byte[] SerialCall4GL(byte[] message);
Takes a Call4GLRequest message as input, processes it, and returns a Call4GLResponse message
byte[] EncodeInitiateResponse(string authToken);
Encodes an InitiateResponse message
byte[] EncodeDisconnectResponse();
Encodes a DisconnectResponse message
byte[] EncodeErrorResponse(int hresult, string guid, string source, string description);
Encodes an ErrorResponse message
Helper Classes for SerialRemoteServer
The following classes are public structures that allow the DecodeXXX methods of the SerialRemoteServer class to return multiple strings as a single return value from the method.
public final class InitiateRequest
{
    public string AppInfo { get; };
    public string User { get; };
    public string Password { get; }
}
public final class Call4GLRequestHeader
{
    public string AuthenticationToken { get; };
    public String ProcedureName { get; };
}
public final class DisconnectRequest
{
    public String AuthenticationToken { get; };