* May partially implement a C# IRCd & IRCClientStack.
parent
c30b5ee014
commit
ac80b6539f
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
|
||||
{
|
||||
class IRCStackModule : IRegionModule
|
||||
{
|
||||
#region Implementation of IRegionModule
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { throw new System.NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { throw new System.NotImplementedException(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||
{
|
||||
/// <summary>
|
||||
/// Adam's completely hacked up not-probably-compliant RFC1459 server class.
|
||||
/// </summary>
|
||||
class IRCServer
|
||||
{
|
||||
private TcpListener m_listener;
|
||||
private bool m_running = true;
|
||||
|
||||
public IRCServer(IPAddress listener, int port)
|
||||
{
|
||||
m_listener = new TcpListener(listener, port);
|
||||
|
||||
m_listener.Start(50);
|
||||
|
||||
Thread thread = new Thread(ListenLoop);
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
m_running = false;
|
||||
m_listener.Stop();
|
||||
}
|
||||
|
||||
private void ListenLoop()
|
||||
{
|
||||
while(m_running)
|
||||
{
|
||||
AcceptClient(m_listener.AcceptTcpClient());
|
||||
}
|
||||
}
|
||||
|
||||
private void AcceptClient(TcpClient client)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue