how to make a chat 1:n without ipc and programming in C?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
well my dear friends, thank you if you are reading this, my question about this.In school i have a task about making a comunication between terminals where there will be a kind of server which will be a terminal and there will be some kinds of clients, which will read the information of the server, that would be like a kind of chat(lol,many kind of),but in fact i wouldnt have to use IPC, but i dont know ho to do that because when im programming my sending of information through scanf in a loop,if this is 1:1 theres no problem but when theres more, until the last had closed his file descriptor to the FIFO(by the way im using a FIFO,lol sorry)so theres no correct communication,theres the beginning of my problm but i dont know ho to read the same FIFO from distinct terminals (which would call clients),the idea is when a client wants to write n send to the server,this receives but when the server wants to reply this would be for every client.if you could help me id be very grateful. See u n blessings.
Distribution: Mostly Gentoo, sometimes Debian/(K)Ubuntu
Posts: 83
Thanked: 6
Memory
Well, use some sort of shared memory storage. Or just simply use a pipe. Or maybe a database. (If you're lazy.)
If the simple things don't work out, you can create a "server" process, which re-submits received messages and keeps a pipe open for each client connected.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.