RTC Forums

Subscription => Support => Topic started by: hannesgw on July 26, 2012, 08:22:10 AM



Title: RtcTcpServer unique identifier?
Post by: hannesgw on July 26, 2012, 08:22:10 AM
Hello I would like to know how I can identify(unique) in a multi-threaded server application, the connections.
So that I can store information to each connection (like sessions).


Title: Re: RtcTcpServer unique identifier?
Post by: D.Tkalcec (RTC) on July 26, 2012, 12:05:09 PM
I'm not sure why you are using raw TCP/IP components instead of HTTP-based components, but if you are asking where you can store information about the physical connection you are currently working with, then check the "Info" property of the "Sender:TRtcConection" parameter (sent to every event triggered for any connection).

NOTE: Session is NOT the same as a physical connection. Normally, sessions will "live" much longer than physical connections, and are used to uniquely identify Clients, independently of physical connections. Would you be using HTTP-based components (TRtcHttpServer/TRtcHttpClient), you would have access to built-in RTC Session management through the "Session" property, which is available on all TRtcDataClient and TRtcDataServer component descendants (used for HTTP communication).

Best Regards,
Danijel Tkalcec