Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to Use Distinguish between user connect and disconnect

Avatar

Level 1

hi

synchronization event is called when user connects ans also when the user disconnects.how can i diffrentiate either user is conected or disconnected when the event is called.Host should be noitfied when a user disconnects with the service.if any  one understand issue please help me out????????thanks

regards

zaheer

3 Replies

Avatar

Level 10

Hi Zaheer,

Use ConnectSession.isSynchronized to tell which state your session is in.

nigel

Avatar

Level 10

Hi Zaheer,

You will have p_evt.isSynchronized set to true when its connected and

set to false when its disconnected. So, you can use this value for

checking the type of Synchronization.

Most of our components in SharedModel makes use of it. You can take a

look at the source code of Synchronization Change handler for any of

these components if you aren still having difficulties.

Hope this helps

Thanks

Hironmay Basu

Avatar

Level 1

thanks Hironmay & Nigel. I found the answer and its working.

thnks

zaheer