Gets the global TipcSrv RTserver connection object.
Note: this method will not create a connection to RTserver. Use
the create method to do this. The methods to send
and receive messages will also automatically connect to RTserver.
Example:
// get the instance of the connection to the RTserver
TipcSrv srv = TipcSvc.Srv;
// create a SmartSockets message to publish
TipcMsg msg = TipcSvc.createMsg(TipcMt.ALERT);
msg.setDest("/foo");
msg.appendStr("warning!");
// TipcSrv.send will automatically connect to the RTserver if not already
srv.send(msg);
srv.flush();
RTserver must be running before a connection is made. The .NET
library does not attempt to start an instance of RTserver.
Creates a new peer-to-peer client connection.
This method creates the client end of a peer-to-peer connection.
The server end must be up and running prior to this call, so the
client has something to connect to. The protocol, hostname, and
port number for the connection are specified as a "logical
connection name" (LCN), using the form: protocol:hostname:port.
"_node" may be substituted for the local hostname.
Example:
// connect to a peer listening via TCP on host foo at port 8002
TipcConnClient conn = TipcSvc.createConnClient("tcp:foo:8002");
// create a SmartSockets message and send it to the server
TipcMsg msg = TipcSvc.createMsg(TipcMt_Fields.INFO);
msg.appendStr("hello");
conn.send(msg);
conn.flush();
Create a new peer-to-peer server connection.
This method creates the server end of a peer-to-peer connection.
The protocol, hostname, and port number are specified using the
same "logical connection name" (LCN) as the client connection.
This connection is only used to accept connections from clients.
All actual communication is done with the client connection
returned by accept.
Example:
// create the server-side of a connection listening via TCP on port 8002
TipcConnServer srvConn = TipcSvc.createConnServer("tcp:_node:8002");
// accept a client connection
TipcConnClient conn = srvConn.accept();
// get the next message sent by the client
TipcMsg msg = conn.next(10.0);
Defines a new message type.
Once a message type is
defined, it may be looked up with the name and number lookup
functions.
For example, to define a new message type named "foo", which
has the number '500', and is intended to take two integer fields
and a string field, you'd do this:
Creates a new TipcSrv RTserver connection object.
All RTserver connections share a common set of options set by the
option assessor methods in the Tut class. Option values
for a particular connection object may be overridden by using the
option assessor methods available to the TipcSrv object,
inherited from the TipcConnClient interface.
The one exception is the ss.unique_subject option. A new
default unique subject will be generated for each TipcSrv object
created by the this method.
Note: this method will not create a connection to RTserver. Use
the create method to do this. The methods to send
and receive messages will also automatically connect to RTserver.
Example:
// create a new connection object
TipcSrv srv = TipcSvc.createSrv();
// set the unique subject of the connection
srv.setOption("ss.unique_subject", "/publish_client");
// create the connection to the RTserver
srv.create();
RTserver must be running before a connection is made. The .NET
library does not attempt to start an instance of RTserver.
Overloaded. Returns the message type indexed by name.
This message type must be one of the standard SmartSockets message types,
or a type previously defined with createMt.
Example:
// look up the message type named "foo"
TipcMt mt = TipcSvc.lookupMt("foo");
If the subject is not absolute (doesn't start with "/"), tack on
the default subject prefix, if it exists. If the prefix isn't
set to anything, it simply returns the original name untouched.
This method should only be invoked when using the global
RTserver connection via the Srv property.
Otherwise, use makeSubjectAbsolute.