Login or Register to Ask a Question and Join Our Community


logic understanding for inter client chat server


 
Thread Tools Search this Thread
Top Forums Programming logic understanding for inter client chat server
# 1  
Old 06-27-2011
logic understanding for inter client chat server

hello everyone,
i am making chat server in linux using c. i have made programs in which group chat can take place between multiple clients but i am not able to understand how to make 2 particular clients chat with each other. please help!!!
# 2  
Old 06-28-2011
It sounds like a matter of filtering, or spinning off another chat from the first for n members. It is a subset of the same chat, probably in a forked off child that removes excess persons. However, you either need now connections/sockets or some session ID code for the new session spun off. The client needs a new window for each included user's screen, the screen needs some sort of title for identification, and the server needs to support a new session, by multiplexing or new connections on a new port and server instance. I would think one server juggling many sessions would be good. Is it tcp or UDP or ???
UDP Broadcast and MBone Multicast would be really cool, as everyone but the author gets every message, but for a CS not peer system, TCP is probably in use. You could multiplex the existing TCP connection using session codes and let the new screen get the data from the old screen using some IPC until the old screen is ended, then take over the same connection socket. If there are three sessions, and session 1 dies, session 2 needs to feed 3, but if 2 dies, 1 still needs to feed 3. Memory mapped files are a really neat IPC, btw! RAM/Cache speeds and no O/S overhead.

Last edited by DGPickett; 06-28-2011 at 05:30 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Help understanding aspell logic

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am working on a script to create a spell check assignment. I have the code written , but it is not working. To... (1 Reply)
Discussion started by: nikkoNIU
1 Replies

2. Homework & Coursework Questions

Help with server client chat system

request create a chat system in linux where a user type smth and all the other users connected to server get the message.then a user have to create join leave or delete a channel of chat if he created it.i did the server and the client but i dont know how to implemt the chat rooms.i was ... (1 Reply)
Discussion started by: demonmind
1 Replies

3. Shell Programming and Scripting

Understanding Logic and Flow better

i am in an epic quagmire of horrid misunderstanding. its been a while since ive been in the scene, couldnt remember my login for the account i used to have here, so excuse the 1st post. i dont want it to seem like ima post n boogy. in any case here we go: just recently installed mandriva... (6 Replies)
Discussion started by: SirDonkeyPunch
6 Replies

4. UNIX for Dummies Questions & Answers

Server-client chat with a bit more

The task is to create a server client chat that contains a few basic safeguards against floods etc and which is capable of issuing at least one or two commands on the client computer. Working samples of such arrangements abound but freeware/shareware samples are not readily available. A catch in... (3 Replies)
Discussion started by: Bobby
3 Replies

5. UNIX for Dummies Questions & Answers

Server/client chat

I want to make the following programm. Using the server/client model I want 2 client to connect to the server then the server sends back to the clients the ip address and a number of a poort in order to open a udp connection between clients without using the server? What I have done since now is... (2 Replies)
Discussion started by: kasma
2 Replies

6. Programming

Chat client-server program

Good day everyone, I'm doing a chat client-server program:server is to receive messages from clients through a TCP port and multicast them back to all clients through a UDP port. This is my client program. I'd not know why it just sends and receives msg from server once, then it stops. Is... (1 Reply)
Discussion started by: powermind
1 Replies

7. Programming

multiuser chat server closes when one client closes. code included

I have been trying to write a very basic chat program but at the moment I am having problems getting it to be multiuser as it closes all connections when one client shutsdown. I have also been having problems trying to get the program to display a list of usernames to the clients. I have tried... (0 Replies)
Discussion started by: dooker
0 Replies
Login or Register to Ask a Question

Featured Tech Videos