且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用C#的简单聊天程序

更新时间:2023-10-17 22:16:34

这里是一个开始的地方.
简单Messenger-类似于AC#MSN Messenger的聊天应用程序 [ ^ ]
Here is a place to start.
Simple Messenger - A C# MSN Messenger-like Chat Application[^]


执行此操作的方法过多.此外,很明显,您所描述的可能不是最终功能,因此,您的设计将取决于您更高级的计划.您可以选择从原始套接字到TpcListener/TcpClient到经典远程处理或WCF(尤其是自托管).

我在过去的回答中提供了有关.NET网络某些主要级别的简短(但不完整)概述:
我如何将byte []发送到另一台PC [ ^ ],
在局域网上与两个Windows应用程序进行通信. [^ ].

—SA
There are too many ways of doing this. Besides, it''s pretty much apparent that what you describe could not be the final functionality, so, your design will depend on your more advanced plans. You can choose from raw sockets to TpcListener/TcpClient to classical remoting or WCF (especially self-hosted).

I provided my short (and incomplete) overview of some major levels of .NET networking in my past answers:
how i can send byte[] to other pc[^],
Communication b/w two Windows applications on LAN.[^].

—SA