|
The user of the UCM control does not have to call any
TCP/IP functions. All communication tasks are handled by the Unitec Communication Manager
Ucm.exe. For local communication the Service
property should not be set.
The > character is interpreted as a
special wildcard string terminator and causes UCM to automatically provide an
unused Service from a Service group. Consider the situation where you want
to allow the user to start multiple occurrences of a given program, each using the same
remote server (Service). The Service table in the UCM configuration
program should list a Service group, e.g.
| Service |
Server |
IP Address |
| myserv1 |
aServer |
128.41.2.1 |
| myserv2 |
aServer |
128.41.2.1 |
| myserv3 |
aServer |
128.41.2.1 |
In the Load event of the form containing the UCM control, you should then
feed the Service property as follows:
On Error GoTo ErrorHandler
Ucm1.Service = "myserv>"
Exit Sub
ErrorHandler:
MsgBox("You have already used all available communication
lines.", _
16, "AppName")
End
If no error occurs, an unused Service of myserv1, myserv2 or myserv3
has been reserved and assigned to the Service property.
Please note, that the wildcard service feature has become obsolete by the introduction
of communication spaces in Release 2.0. It is maintained for compatibility and may be
dropped in a future release.
As outlined in Chapter 1, Section 1.2 About UCM, any
number of Ucm.ocx controls may be placed on a form. An application server typically
handles requests of multiple controls on different forms, each of which has the same Service
property value but different MessageID
settings. The message dispatching algorithm is as follows:
A message sent by an UCM control through OutputMsg
is forwarded to
- the server identified by the Service value. (If no such connection
exists, the communication manager UCM will create the socket and thus
start the remote server).
- any local UCM control with the proper InputID setting, when both the sending and the
receiving control have their Service property not set. This may result in
a broadcast type message, if more than one control have the same InputID
value. If no such control exists on the local system and the AutoStart
section created with UcmConf(U) defines a process for
the given message ID, the named process is spawned, else the message is silently ignored.
A message sent by a remote server process is forwarded to any control that has the Service
property set to the value that caused UCM to initialize the socket connection, and
the InputID property set to the ID of the message.
Again, this may result in a broadcast type message, if more than one control meet this
condition. If no such control exists on the local system and the AutoStart section
created with UcmConf(U) defines a process for the given
message ID, the named process is spawned, else the message is silently ignored. |