Jump to content

Recommended Posts

I have a chat server, and I am trying to figure out the best way to handle a one on one conversations between two people. So if I have 2 different conversations going (4 people). I don't want to let one group see the other groups conversation, and vise versa. Currently the UI, is a flash file with an input box and conversation box.

 

Any suggestions how I can/should handle the information?

Link to comment
https://forums.phpfreaks.com/topic/193712-one-on-one-conversations/
Share on other sites

To save a resource in a database, would I save this:

 

Resource id #6

 

into a varchar field?

 

then when the second person connects to a particular person, check the database to see what the resource is, and then search the array for a particular resource... so only those two talk. Would this work, or even make sense?

Im starting to thing that it may be best to have a server, that starts up another program.

 

A main one to listen for new connections, and when one comes it decides if this is a new conversation, or joining of a current one...

If it is a new conversation, dispatch a new sub server on its own port. If it is joining a current one, change the current connection port.

 

sound like a better way to do this?

A resource is not storeable. Why are you even seeing a resource id in output, if you are you need to pass that var on to something else to get anything meaningful like data. How did you get the resource id?

 

What I would do is to assign a port to a pair and put it into their SESSION. Although I've never done it I think that should keep the conversations separate.

 

 

HTH

Teamatomic

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.