基于.NET的IRC服务器

发布于 2024-10-07 15:53:15 字数 293 浏览 5 评论 0原文

目前是否有用 .NET 编写的 IRC 服务器(不是服务)?

我的一位同事以前从未使用过 IRC,也没有听说过它,这让我很惊讶,因为他熟悉 Jabber 和其他消息协议。

想向他展示使用 .NET 的协议有多么简单(他了解 VB.NET、Flash 和 3D 设计,因此 .NET 可能是我向他展示的唯一方式)。

在我的搜索中只能找到客户端的代码,没有服务器。

有人知道有一个比较接近标准的吗?不需要像 nickserv 等花哨的东西。

注:指服务器本身,如UnrealIRCD等;不是服务。

Is there currently an IRC Server (not Services) written in .NET?

One of my coworkers had never used IRC before, or heard of it, which surprised me because he is familiar with Jabber and other messaging protocols.

Wanted to show him how simple the protocol is using .NET (he knows VB.NET, Flash, and 3D Design, so .NET is probably only way I could show him).

Can only find code for Clients in my search, no servers.

Anyone know of one, that sticks relatively close to the standard? No fancy stuff like nickserv etc is needed.

Note: Referring to the server itself, like UnrealIRCD etc; not services.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

宫墨修音 2024-10-14 15:53:16

快速搜索发现我这个(相当旧)...

http://sourceforge.net/projects/csharpircserv/


这部分代码侦听传入的连接

    public cSocket(string Server, int Port)
    {
        if(sock != null && sock.Connected)
        {
            sock.Shutdown(SocketShutdown.Both);
            System.Threading.Thread.Sleep(10);
            sock.Close();
        }
        sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);    
        IPEndPoint ep = new IPEndPoint(IPAddress.Parse(Server), Port);
        AsyncCallback onconnect = new AsyncCallback(OnConnect);
        sock.BeginConnect(ep, onconnect, sock);
    }

Main.cs 的这部分对 Ping 的响应

    switch(sp[0].ToLower())
                        {
                            case "ping":
                                s.Send("PONG :"+co[1]);
                                break;

A quick search found me this one (quite old) ...

http://sourceforge.net/projects/csharpircserv/


This section of the code listens for incoming connnections

    public cSocket(string Server, int Port)
    {
        if(sock != null && sock.Connected)
        {
            sock.Shutdown(SocketShutdown.Both);
            System.Threading.Thread.Sleep(10);
            sock.Close();
        }
        sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);    
        IPEndPoint ep = new IPEndPoint(IPAddress.Parse(Server), Port);
        AsyncCallback onconnect = new AsyncCallback(OnConnect);
        sock.BeginConnect(ep, onconnect, sock);
    }

This section of Main.cs responses to Ping

    switch(sp[0].ToLower())
                        {
                            case "ping":
                                s.Send("PONG :"+co[1]);
                                break;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文