All,
While it is possible for an application to request a port number from *nix, 
there is no way to demand it.  When an app is not holding the port number, the 
OS is free to assign it to another process, and a later attempt to assign it 
will fail.
So the requested behavior of a client remembering the port number doesn?t work 
in general, though it can be shown to work occasionally.  Even though it might 
work much of the time, the client would have to deal with the times it doesn?t 
work.
If "living room light" shut down, then we should find "living room light" 
again. It is very inconvenience user experience.
The experience depends on how the application is written.  IoTivity (and CoAP 
and ReST it is built on) is intended to be stateless, and discovery is the 
appropriate means to reconnect and provide a convenient user experience.
John


From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of ASHOKBABU CHANNA
Sent: Thursday, January 21, 2016 5:27 AM
To: Uze Choi; Macieira, Thiago; iotivity-dev at lists.iotivity.org
Subject: Re: [dev] Need API to set static "sid" and "port number".


Hi,

Even after setting di, it may not be possible to use the same port number as 
base layer always bind to port zero

(system assign the free port if we bind to zero).  We may need to modify the 
IoTivity base ( RI-CA Interface) to retrain and use the previous configuration.



Regards,
Ashok

------- Original Message -------

Sender : Uze Choi<uzchoi at samsung.com<mailto:uzchoi at samsung.com>> 
S6/Principal Engineer/IoT Lab./Samsung Electronics

Date : Jan 21, 2016 11:38 (GMT+05:30)

Title : Re: [dev] Need API to set static "sid" and "port number".


There is no API to set the di by application.
However, di is set by iotivity stack internally during initialized.
In case of secure mode, di is permanent.
But in case of non-secure mode, versatile.
I believe di setting API will resolve this issue.

BR, Uze Choi
-----Original Message-----
From: iotivity-dev-bounces at lists.iotivity.org<mailto:iotivity-dev-bounces at 
lists.iotivity.org> [mailto:[email protected]] On Behalf 
Of Thiago Macieira
Sent: Thursday, January 21, 2016 2:12 PM
To: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at 
lists.iotivity.org>
Subject: Re: [dev] Need API to set static "sid" and "port number".

On Thursday 21 January 2016 04:19:56 ??? wrote:
> Hi all,
>
> I have a problem about Iotivity reconnection server and client.
> Real product has many network connection problems (include
> shutdown...)
>
> IoTivity server change sid and port number every run.
> It is a problem.

What is the sid? Do you mean the device ID? The device ID should be set by your 
application, after loading it from permanent storage.

As for the port number, it is correct to change on every run.

> If "living room light" shut down, then we should find "living room light"
> again. It is very inconvenience user exprience.

Correct.

> So, I need a API to set static "sid" and "port number".
> (OCInit() has port number parameter, but didn't work)

You need to set "di" (device ID), but not the port number.
--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>
https://lists.iotivity.org/mailman/listinfo/iotivity-dev





[cid:image001.gif at 01D15421.B4C5F060]

[http://ext.samsung.net/mailcheck/SeenTimeChecker?do=28bccb0e7a1e0d065d2d9cdb5da80932aaf391743e858efaa1889aa8efbbee4713d69ea60670f66e1fac5bf6c61543587bc8a6096cfbfc9f02e038c8d853bffbdb9fdddda33e82cbe4a391424e62fcf6cf878f9a26ce15a0]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160121/35d5978b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 13168 bytes
Desc: image001.gif
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160121/35d5978b/attachment.gif>

Reply via email to