多人聊天的C程序 [英] c program for multiuser chat

查看:84
本文介绍了多人聊天的C程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我获得用C语言进行的多用户聊天

please help me to get a multiuser chat in c language

推荐答案

请付出一些努力.然后我们可以为您的项目提供帮助.
根据定义,帮助"-表示协助.这并不意味着为我做".

您没有明确要求别人为您做,但什么也没显示-甚至没人知道您尝试过什么以及被困在哪里.

一些提示-将问题分解为较小的步骤或小块,并逐一解决.
像这样的任务:
a)创建服务器,以侦听来自客户端的连接
b)考虑一种数据传递方案-如何识别每封邮件的作者和收件人.
c)由客户端连接到服务器.

当您将任务分解为较小的问题时,查找涉及项目特定方面的文章或教程变得非常容易.

将程序的各个部分可视化为黑匣子"通常很方便-只专注于它们的输入和输出是什么.在设计过程中执行此操作可使您构建项目的概念图,并确定这些组件具有的要求.

好运. :)
Please display some effort. Then we can help you with your project.
By definition, ''help'' - means to assist with. It doesn''t mean ''do for me''.

You don''t explicitly ask for someone else to do it for you, but have displayed nothing - no-one even has a clue what you''ve tried and where you''re stuck.

Some hints - break the problem up into smaller steps or chunks, and solve them individually, one by one.
Tasks like:
a) Create a server, to listen for connections from clients
b) think of a data-passing scheme - how will each message''s writer and recipient be identified.
c) Connect to the server by a client.

When you break the task up into smaller problems, it becomes very much easier to find an article or tutorial that deals with that particular aspect of the project.

It''s often handy to visualize various parts of the program as ''black-boxes'' - concentrating only on what their input and output will be. Doing this during design allows you to build a conceptual picture of your project and identify requirements that these components have.

Best luck. :)


这篇关于多人聊天的C程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆