Revision history [back]

click to hide/show revision 1
initial version

what is the role of session port in alljoyn

In TCP/UDP, one device has only one ip, and port is used to distinguish different services. However, in alljoyn, every service has a unique well-known name, so why we need session port here? In a sample service code, BusAttachment requests a name, and bind to a session port, it seems that the name has already identify the BusAttachment, the session port is meaningless.

what is the role of session port in alljoyn

In TCP/UDP, one device has only one ip, and port is used to distinguish different services. However, in alljoyn, every service has a unique well-known name, so why we need session port here? In a sample service code, BusAttachment requests a name, and bind to a session port, it seems that the name has already identify the BusAttachment, the session port is meaningless.meaningless. I thought one busAttachment can bind to only one well-known name and one sessionPort thus I thought sessionPort is redundant, but today I read the sample code RawService and I know I was wrong. In this sample a busAttachment requests 2 different well-known names and bind to 2 different sessionPorts. Now I am more confused about well-known name and sessionPort. The methond bindSessionPort take no argument of well known name nor the SessionPortListener.acceptSessionJoiner callback, so if the busAttachment request 2 different names, How does it know which name the client want to join by calling joinSession?