connector
object must be allocated on the heap so it is necessary that the object is created as pointer and allocated with new
operator.
The correct way to use the object is:
openmaia::connector *myconnector = new openmaia::connector();
There are four constructors for the connector
objects according with the use you want to do.
-connector()
Construct an instance of connector
that will connect to localhost:60201
server and will not receive messages from TCP.
-connector(host,port)
Construct an instance of connector
that will connect to host:port
server and will not receive messages from TCP.
-connector(void (*handler)(openmaia::message))
Construct an instance of connector
that will connect to localhost:60201
server and will call function handler
when a message arrive.
-connector(void (*handler)(openmaia::message),host,port)
Construct an instance of connector
that will connect to host:port
server and will call function handler
when a message arrive.