Integratec API Platform
opNetApi.opClientConnection Class Reference

This class provides an interface for sending requests and receiving replies. More...

Classes

class  statusEventArgs
 Arguments for statusEvent. More...
 

Public Member Functions

 opClientConnection ()
 Initializes the instance without opening a client connection.
 
 opClientConnection (string ip, int port)
 Initializes the instance and opens a client connection. More...
 
void open (string ip, int port)
 Opens and registers a client connection to a master. More...
 
void close ()
 Closes the client connection. More...
 
string sendRequest (string serviceId, string request)
 Sends an asynchronous request. More...
 
string receiveReply (string requestId, int timeoutMs)
 Receives a reply to an asynchronous request. More...
 
void deleteRequest (string requestId)
 Deletes the record of a request. More...
 
string sendRecvDelete (string serviceId, string request, int timeoutMs)
 Sends a request and waits for the reply. More...
 

Properties

string brokerId [get]
 Gets the identity of the broker connected to. More...
 
dynamic call [get]
 Gets a dynamic object that can be used to make Remote Procedure Calls.
 
bool isOpen [get]
 Indicates whether or not a client connection is open. More...
 

Events

EventHandler< statusEventArgsstatusEvent
 Event that receives status updates for in progress requests.
 

Detailed Description

This class provides an interface for sending requests and receiving replies.

Attention
An opClientConnection object is NOT thread-safe, meaning that while you are allowed to use the object in multiple threads, you must ensure that you are not calling its methods simultaneously in multiple threads.