可以在C程序中开发聊天信使应用程序 [英] Can is it possible to develop the chat messenger application in C programme
问题描述
您好,
可以在C程序中开发聊天信使应用程序。
请建议我如何继续这个。
谢谢。
Hello,
Can is it possible to develop the chat messenger application in C program.
Please suggest me how to proceed on this.
Thank you.
推荐答案
有可能吗?是的。
我会这样做吗?没有。
为什么不呢?因为与现代语言中提供的设施相比,C程序可用的库函数范围非常有限 - 这意味着我可以写的地方:
Is it possible? Yes.
Would I do it? No.
Why not? Because the range of library functions available to a C program is pretty limited compared to the facilities available in more modern languages - which means that where I could just write:
server = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPEndPoint ipLocal = new IPEndPoint(IPAddress.Any, Convert.ToInt32(port));
server.Bind(ipLocal);//bind to the local IP Address...
server.Listen(5);//start listening...
(代码从这里复制:简单的Messenger - AC#MSN Messenger-like聊天应用程序 [ ^ ])
在C中,你需要做更多的工作 - 几乎整本书的价值:http://cs.ecs.baylor.edu/~donahoo/practical/CSockets/ [ ^ ]
和th在您到达任何用户界面之前。
但是......如果必须,请点击链接,然后开始阅读!
(Code copied from here: Simple Messenger - A C# MSN Messenger-like Chat Application[^] )
In C, you have to do a lot more work - pretty much a whole book's worth: http://cs.ecs.baylor.edu/~donahoo/practical/CSockets/[^]
And that's before you get to any user interface.
But...if you must, then follow the link, and start reading!
这篇关于可以在C程序中开发聊天信使应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!