sse library

Classes

DeliverRep
Interceptor chain disposed sse will return SSEResponse , SSEResponse will convert to DeliverRep, DeliverRep will convert to PopRep. SSEResponse -> DeliverRep - PopRep Each step have a little extra data for bride multiple module. SSEResponse : Meaning interceptor disposed result. DeliverRep : Meaning interceptor manager disposed result. PopRep : Provide to SSECacheDeliverer
ISSEStream
NativeStreamRouter
A router that responsible for route stream data from native (Android or Ios) to corresponding SSEBridge object in registers. Because stream data depend native platform transforming, flutter end don't know which is which for multiple SSEBridge exist. It is possible to know how to distribute to the corresponding SSEBridge through the NativeStreamRouter.
NotifyPriority
ServerSentEvent<T>
ServerSentEventCache
SSEBridge
Native to Flutter Stream Cache
SSEChain
SSE chain of responsibility for distribution to the corresponding interceptor
SSEConnectObserver
Connection state observer name Tag name,Only used for print troubleshooting in log priority Notify priority , Connection state change event will prioritize notify to observers, built in : NotifyPriority.high NotifyPriority.middle NotifyPriority.low You can also custom priority by set NotifyPriority.value onConnectStateChange More detail value ref ConnectState, If return true, Don't be sent to subsequent observers, If return false will continue send.
SSEFilter
Purpose for convert a sse object to multiple sse objects. Client receive server sse maybe is whole message in theater situation, program need to slice it to one after one char to mock printer effect.
SSEInterceptor
SSEInterceptorLifeCycle
SSE Interceptor lifecycle. onCreate | onMatchChain | onDestroy
SSEInterceptorManager
SseOfflineProvider
This class provides offline SSE distribution functionality.
SSEProcessor
SSEProcessorConfig
SSEResponse
StreamAdapter
Stream raw data to ServerSentEvent data structure when transforming from server. SSEProcessor support custom transform process. There is SSEStreamAdapterDefault will use if don't set StreamAdapter outside.
StreamBundle
It's used to cache bytes stream from native, bytesBuffer is cache real data from native stream. StreamBundle corresponding to streamId which is native stream and flutter bridge stream relationship unique id. StreamId and StreamBundle related to SSEBridge.streamBufferMaps. isEnd is flag that represent native stream end. Which set ture when receive a string SSEBridge.streamEndFlag from native stream. isError is flag represent native stream throw error when transforming.
WatchEvent
WatchPriority

Enums

AutoClearStrategy
Interceptor clear strategy round At an round interaction process don't automatic destruction (Destruction after reset) Deprecated. stream Automatic destroy interceptor when stream done, this is a relatively recommended way than full type.
ConnectState
connectActive 连接正常,正在传输数据 connectIdle 连接正常,超过SSEClient._idleTimeout无数据传输 connectException 连接正常,但是过长时间没有数据传输, 超过SSEClient._exceptionTimeout connectSuspend 连接正常,被客户端挂起了,没有数据传输,这个和connectException做区分,connectException无数据传输是异常情况,但是connectSuspend不是. disconnectRepairing 连接已断开,但是正在进行重试 (保留状态,暂时未使用) disconnectError 连接已断开,已超过重试最大次数 disconnectNormal 连接已断开,非异常断开,可能是临时断开,会由程序尝试重新连接
DelivererState
pause Pause sse deliver active Resume active sse deliver

Extensions

ChainEx on List<SSEInterceptor>
OfflineRequestOptions on RequestOptions
ReleaseAbleEx on List<Destroyable>
RequestOptionsEx on RequestOptions

Constants

eventAutoRemoveLogId → const String
eventAutoRemoveType → const String

Properties

sseProcessor SSEProcessor
Why:
no setter
sseProcessorNullable SSEProcessor?
no setter

Functions

isInitSSEProcessor() bool

Typedefs

SSEProcessorFactory = SSEProcessor? Function()