SbeServer
SBE server.
Наследует: BaseProtocolServer<ClientSbeSession, SbeServerSubscription, SbeServerSettings>
Конструкторы
SbeServer(IAuthorization, ITransactionIdStorage, string, DateTime, IMessageConverter)
Initializes a new instance of the SbeServer.
Свойства
Authorization : IAuthorization
The customer authentication.
ComponentTimestamp : DateTime
Component timestamp.
Converter : IMessageConverter
Message converter.
LicenseFeatureId : string
License feature id.
SendOutHeartbeats : bool
Send heartbeat via outgoing messages channel.
Методы
ConfigureAcceptedSocket(TcpClient)
Apply TCP KeepAlive to an accepted client socket. Keep-alive probes keep NAT/firewall flow entries alive and surface dead peers quickly.
CreateSubscription(ClientSbeSession, string, ServerSubscription, MessageTypes) : SbeServerSubscription
NextResponseId() : string
Generate a unique response ID that does NOT pollute TransactionIdStorage. Prevents collision between server-generated response IDs and client-supplied mdReqIds.
OnClearListenerState()
Clear protocol-specific listener state (stop listeners, etc.).
OnProcess(ClientSbeSession, ushort, byte[], CancellationToken) : IAsyncEnumerable<Message>
Dispatch incoming SBE message by templateId.
OnStartListeners(CancellationToken)
Start protocol-specific listeners (TCP, etc.). Add tasks to _backgroundTasks.
ProcessInMessage(Message, CancellationToken)
Process an incoming message and route to subscribed clients.
ReadFramedMessageAsync(Stream, CancellationToken) : Task<byte[]>
SBE framing: read [4-byte length][payload].
ScheduleSessionWork(ClientSbeSession, ServerSubscription, string, Func<ClientSbeSession, string, CancellationToken, ValueTask<bool>>)
WriteFramedAsync(ClientSbeSession, Func<SbeRecordSerializer, byte[], int>, CancellationToken) : ValueTask<bool>
Central outgoing write path: serialize the message into the session write buffer (growing and retrying on overflow so large frames are not dropped), then frame and send it. The buffer may be reallocated by Int32}), so it is re-read after serialization.