29 using System.Collections.Generic;
31 using System.Net.Sockets;
32 using System.Reflection;
34 using System.Threading;
36 using OpenSim.Framework;
37 using OpenSim.Framework.Monitoring;
38 using OpenSim.Region.Framework.Scenes;
40 namespace OpenSim.
Region.OptionalModules.
Agent.InternetRelayClientView.Server
51 private readonly TcpListener m_listener;
52 private readonly
Scene m_baseScene;
53 private bool m_running =
true;
57 m_listener =
new TcpListener(listener, port);
61 WorkManager.StartThread(ListenLoop,
"IRCServer", ThreadPriority.Normal,
false,
true);
62 m_baseScene = baseScene;
71 private void ListenLoop()
75 AcceptClient(m_listener.AcceptTcpClient());
76 Watchdog.UpdateThread();
79 Watchdog.RemoveThread();
82 private void AcceptClient(TcpClient client)
84 IRCClientView cv =
new IRCClientView(client, m_baseScene);
86 if (OnNewIRCClient != null)
delegate void OnNewIRCUserDelegate(IRCClientView user)
Adam's completely hacked up not-probably-compliant RFC1459 server class.
IRCServer(IPAddress listener, int port, Scene baseScene)
OnNewIRCUserDelegate OnNewIRCClient