简体   繁体   中英

.NET based IRC Server

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.

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM