/// <summary> /// Construct a new <see cref="AsyncTcpServerConfiguration"></see> class's instance. /// </summary> /// <param name="buffer_manager">Segment buffer manager.</param> public AsyncTcpServerConfiguration(ISegmentBufferManager buffer_manager) { this.BufferManager = buffer_manager; this.ReceiveBufferSize = 8192; this.SendBufferSize = 8192; this.ReceiveTimeout = TimeSpan.Zero; this.SendTimeout = TimeSpan.Zero; this.NoDelay = true; this.LingerState = new LingerOption(false, 0); this.KeepAlive = false; this.KeepAliveInterval = TimeSpan.FromSeconds(5); this.ReuseAddress = false; this.PendingConnectionBacklog = 200; this.AllowNatTraversal = true; this.SslEnabled = false; this.SslServerCertificate = null; this.SslEncryptionPolicy = EncryptionPolicy.RequireEncryption; this.SslEnabledProtocols = SslProtocols.None; this.SslClientCertificateRequired = true; this.SslCheckCertificateRevocation = false; this.SslPolicyErrorsBypassed = false; this.ConnectTimeout = TimeSpan.FromSeconds(15); this.FrameBuilder = new LengthPrefixedFrameBuilder(); }
public byte[] ToArray(IFrameBuilder builder) { if (builder == null) { throw new ArgumentNullException("builder"); } return(builder.EncodeFrame(this)); }
protected override void WriteInternal(IFrameBuilder builder) { builder.WriteString(ObjectId); builder.WriteString(MethodName); builder.WriteBuffer(SerializedParameters); builder.WriteBoolArray(Selector); builder.WriteStringArray(ObjectIds); }
public TransportTerminalFunction(SynchronousPhysicalInterface spi, NodeMode mode) { this.spi = spi; rst = new RegeneratorSectionTermination(); this.nodeMode = mode; if (nodeMode == NodeMode.MULTIPLEXER) { mst = new MultiplexSectionTermination(); } this.spi.HandleInputData += new HandleInputData(getInputData); builder = new FrameBuilder(); }
public TransportTerminalFunction(SynchronousPhysicalInterface spi, NodeMode mode) { this.spi = spi; rst = new RegeneratorSectionTermination(); this.nodeMode = mode; if (nodeMode == NodeMode.MULTIPLEXER) { mst = new MultiplexSectionTermination(); } this.spi.HandleInputData += new HandleInputData(getInputData); builder = new FrameBuilder(); }
internal void Write(IFrameBuilder builder) { builder.WriteString(Message); builder.WriteString(StackTrace); builder.WriteString(ExceptionType); if (InnerException != null) { builder.WriteBool(true); _innerException.Write(builder); } else { builder.WriteBool(false); } }
public HigherOrderPathConnection(TransportTerminalFunction ttf) { this.ForwardingTable = new Dictionary <int, List <ForwardingRecord> >(); this.ttf = ttf; this.ttf.HandleInputFrame += new HandleInputFrame(HandleIncomFrame); Builder = new FrameBuilder(); InputCredentials = new Dictionary <int, IFrame>(); OutputCredentials = new Dictionary <int, IFrame>(); Connections = new List <ForwardingRecord>(); Dictionary <int, StmLevel> allPorts = ttf.GetPorts(); foreach (int port in allPorts.Keys) { InputCredentials.Add(port, new Frame(allPorts[port])); OutputCredentials.Add(port, new Frame(allPorts[port])); } }
public HigherOrderPathConnection(TransportTerminalFunction ttf) { this.ForwardingTable = new Dictionary<int, List<ForwardingRecord>>(); this.ttf = ttf; this.ttf.HandleInputFrame += new HandleInputFrame(HandleIncomFrame); Builder = new FrameBuilder(); InputCredentials = new Dictionary<int, IFrame>(); OutputCredentials = new Dictionary<int, IFrame>(); Connections = new List<ForwardingRecord>(); Dictionary<int,StmLevel> allPorts = ttf.GetPorts(); foreach (int port in allPorts.Keys) { InputCredentials.Add(port, new Frame(allPorts[port])); OutputCredentials.Add(port, new Frame(allPorts[port])); } }
/// <summary> /// Construct a new <see cref="AsyncUdpClientConfiguration"></see> class's instance. /// </summary> /// <param name="buffer_manager">Segment buffer manager.</param> public AsyncUdpClientConfiguration(ISegmentBufferManager buffer_manager) { this.BufferManager = buffer_manager; this.ReceiveBufferSize = 8192; this.SendBufferSize = 8192; this.ReceiveTimeout = TimeSpan.Zero; this.SendTimeout = TimeSpan.Zero; this.KeepAlive = false; this.KeepAliveInterval = TimeSpan.FromSeconds(5); this.ReuseAddress = false; this.EnableBroadcast = true; this.DontFragment = true; this.ConnectTimeout = TimeSpan.FromSeconds(15); this.FrameBuilder = new LengthPrefixedFrameBuilder(); }
protected override void WriteInternal(IFrameBuilder builder) { }
public GameParser(IFrameBuilder builder) { _builder = builder ?? throw new ArgumentNullException(nameof(builder)); _index = 0; }
public void Write(IFrameBuilder builder) { builder.WriteString(IpAddress); builder.WriteInt(Port); }
public FrameTest() { _frameBuilder = new FrameBuilder(); }
protected abstract void WriteInternal(IFrameBuilder frameBuilder);
protected override void WriteInternal(IFrameBuilder builder) { Exception.Write(builder); }
protected override void WriteInternal(IFrameBuilder builder) { builder.WriteString(ObjectId); }
public byte[] ToArray(IFrameBuilder builder) { if (builder == null) throw new ArgumentNullException("builder"); return builder.EncodeFrame(this); }
protected override void WriteInternal(IFrameBuilder builder) { builder.WriteByte((byte)_errorType); builder.WriteString(_message); }