On 08/04/2017 07:40 AM, Bharath T s wrote:
> while working on server(edison) i tried understanding a functions ocinit(),
> through which we can connect to particular client(gateway/client).\
> i'm more interested to know how OCinit() can be used.since arguments are not
> utilized in it.
It just initializes the stack, you need to do additional work to
discover and speak to another endpoint.
OCIinit does still take one significant argument, "mode", which
describes the intended operating mode of this instance (not of the remote):
* Host Mode of Operation.
OC_CLIENT = 0,
OC_GATEWAY /**< Client server mode along with routing
Remember, when you talk about "connect to", in the most common model a
connection-oriented transport is not used (the cloud/tcp case is a
little different). Instead for the client role, you discover resources
and send REST requests to them, which is a connection-less operation.
Your next steps after OCInit should be described here:
iotivity-dev mailing list