LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   chating with socket (https://www.linuxquestions.org/questions/programming-9/chating-with-socket-340421/)

bigapple 07-05-2005 09:27 PM

chating with socket
 
Hi ,all

These days i have read some books about linux socket programming, and I have write a program that can provide a server and a clint to chating by socket.
And now ,I want to write a program. there is one server and several client can connnect to the server. the number of client is limited , the maximum client number and the port can be set in a .ini file.

when the Server is starting ,i can use the client to connect to the server ,and if there is anybody connected the server ,too. I can use some commands (may be 'list') to know how many and who are connecting to the server. then i can use another command (may be 'chat' ) to chat with the very client.

I think it is just like some chating room based on WEB, but it not use the GUI.

NOw I am doing some high level design. So can you give me some suggestion about it, any thing you say is helpful!

Thank you!

Matir 07-06-2005 02:31 PM

In order to have multiple clients, you'll probably want to use non-blocking I/O and/or threads. I would use non-blocking I/O to avoid having to deal with IPC, myself.


All times are GMT -5. The time now is 02:28 AM.