I've read through:
but culdn't find anywhere this specific solution.
basically what Im trying to do is a kind of facebook chat that keeps track of my online friends and enables me to talk to them, while they cant talk with each other through my group.
Im using FMS and the ServerSide app holds a table with a SessionInfo for each client (name, birthyear, UID, client...),
The app also loads an XML of my friends' UID's.
by matching the friends' UID's to the SessionInfo table each user knows which of his friends are connected and what is their peerID
(client.nearID or client.farID?).
keep in mind that due to security reasons the clientside app cannot know the UID and the paths to the XML's so what im passing to the client is an array of online friends (with their peerID,name,profilePicture).
the question is what approach to take next inorder to acomplish what i've discribed?
1)open my group and connect to all my friend's groups, by naming a group as netconnection.nearID.
*how do i know when a friend connected/disconected?
*which group will I turn to post/recieve massages and how to direct the massage to a specific peerID?
2)open my group and bootstrap > addNeighbor all the peerID's manualy
*can the peer know that i've manualy added him to my group and who am I?
*how will the comunication between us work? meaning, how will i send the massage to a peer in my group and only that peer will recieve it and know which peer sent it, does he answer me through his group by adding the sender's peer as a neighbor (incase he isnt already)?
i've started with fms and net-groups/connections/streams few days ago and im really confused =\
I'll be thankfull if someone can share his knowledge and explain the right way (if its possible at al) to do it.
(sorry for my english ).
lets say that FMS corrently holds 1000 sessions and i connect to it through rtmfp (inorder to open the netGroup if needed using the same nc).
FMS checks which of the 1000 sessions holds my friends' UID as sessionName and finds out i have 3 friends connected then adds them to my OnlineFriendArray at my SessionInfo.
through a loop this array adds a movieClip representing a friend at my application and also calls a function at each of my friends app adding me to their stage.
if a friend connects the same proccess happens again and we are added to each others onlineArray and stage.
if a friend disconnects he is removed from my online friends array and stage.
every friend movieClip holds the peerID of the friend.
what im struggling to understand is how to use netGroups in order to allow me to chat with any friend i press individualy+ the option to add another online friend to the conversation + the ability to start a video conversation with a friend im having chat.
right... so after scratching my head alot i've used FMS4 as the peer exchanger and a user that connects to the app knows the peerID's of his online friends.
how to use this information to start a chat between a selected peerID?