Click or drag to resize

LogicalChannelSendRequest Method (String, Object, Int32)

Sends a request message to a destination and then blocks waiting for the reply message for at most timeout milliseconds.

Namespace:  OBCOM.NetSwitchLib.Clients
Assembly:  OBCOM.NetSwitchLib (in OBCOM.NetSwitchLib.dll) Version: 1.48.7760.35650 (1.48.7760.35650)
Syntax
public Message SendRequest(
	string destination,
	Object data,
	int timeout
)

Parameters

destination
Type: SystemString
The request destination switch:server.service.
data
Type: SystemObject
The data to include in the request message (can be null).
timeout
Type: SystemInt32
The maximum time to wait for a reply (in milliseconds).

Return Value

Type: Message
The reply message returned from the NetSwitch server.
Exceptions
ExceptionCondition
ArgumentNullExceptiondestination is null or empty.
ArgumentOutOfRangeExceptiontimeout is negative.
InvalidOperationException The logical channel is closed.
Remarks

The value of destination must have the following format:

[SwitchName:]ServerName[.ServiceName]

where optional items are shown within "[" and "]" brackets, and the characters ":" and "." stand for themselves.

If the optional SwitchName is not specified, the message is sent to the connected NetSwitch server.

ServerName is the name of a server, either Listener or a Connector.

The optional ServiceName is the name of a service provided by the server, or the name of a channel of a listener. The following are examples of valid destinations:

             POS_DEVICE
             SWITCH.LOG_ERROR
             HUB:IMSER.ADD_CONTACT

Argument timeout specifies the amount of time to wait for the synchronous reply message.

See Also