mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-07 07:00:33 -04:00
Removed NioTSO client and server
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
This commit is contained in:
parent
f12ba1502b
commit
22191ce648
591 changed files with 53264 additions and 3362 deletions
38
server/FSO.Server.Protocol/Aries/AriesProtocol.cs
Executable file
38
server/FSO.Server.Protocol/Aries/AriesProtocol.cs
Executable file
|
@ -0,0 +1,38 @@
|
|||
using Mina.Filter.Codec;
|
||||
using Ninject;
|
||||
using Mina.Core.Session;
|
||||
|
||||
namespace FSO.Server.Protocol.Aries
|
||||
{
|
||||
public class AriesProtocol : IProtocolCodecFactory
|
||||
{
|
||||
private IKernel Kernel;
|
||||
|
||||
public AriesProtocol(IKernel kernel)
|
||||
{
|
||||
this.Kernel = kernel;
|
||||
}
|
||||
|
||||
private IProtocolDecoder _Decoder;
|
||||
|
||||
public IProtocolDecoder GetDecoder(IoSession session)
|
||||
{
|
||||
if (_Decoder == null)
|
||||
{
|
||||
_Decoder = Kernel.Get<AriesProtocolDecoder>();
|
||||
}
|
||||
return _Decoder;
|
||||
}
|
||||
|
||||
private IProtocolEncoder _Encoder;
|
||||
|
||||
public IProtocolEncoder GetEncoder(IoSession session)
|
||||
{
|
||||
if(_Encoder == null)
|
||||
{
|
||||
_Encoder = Kernel.Get<AriesProtocolEncoder>();
|
||||
}
|
||||
return _Encoder;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue