Skip to main content

ServerEventsClient

Assembly: ServiceStack.Client.dll
View Source
Declaration
public class ServerEventsClient : IDisposable

Properties

IsStopped

View Source
Declaration
public bool IsStopped { get; }

Status

View Source
Declaration
public string Status { get; }

TimesStarted

View Source
Declaration
public int TimesStarted { get; }

ConnectionInfo

View Source
Declaration
public ServerEventConnect ConnectionInfo { get; }

SubscriptionId

View Source
Declaration
public string SubscriptionId { get; }

ConnectionDisplayName

View Source
Declaration
public string ConnectionDisplayName { get; }

ResolveStreamUrl

View Source
Declaration
public Func<string, string> ResolveStreamUrl { get; set; }

BaseUri

View Source
Declaration
public string BaseUri { get; set; }

Channels

View Source
Declaration
public string[] Channels { get; set; }

EventStreamPath

View Source
Declaration
public string EventStreamPath { get; set; }

EventStreamUri

View Source
Declaration
public string EventStreamUri { get; }

ServiceClient

View Source
Declaration
public IServiceClient ServiceClient { get; set; }

LastPulseAt

View Source
Declaration
public DateTime LastPulseAt { get; set; }

EventStreamRequestFilter

View Source
Declaration
public Action<WebRequest> EventStreamRequestFilter { get; set; }

HeartbeatRequestFilter

View Source
Declaration
public Action<WebRequest> HeartbeatRequestFilter { get; set; }

UnRegisterRequestFilter

View Source
Declaration
public Action<WebRequest> UnRegisterRequestFilter { get; set; }

AllRequestFilters

Apply Request Filter to all ServerEventClient Requests

View Source
Declaration
public Action<WebRequest> AllRequestFilters { get; set; }

Resolver

View Source
Declaration
public IResolver Resolver { get; set; }

Handlers

View Source
Declaration
public ConcurrentDictionary<string, ServerEventCallback> Handlers { get; }

NamedReceivers

View Source
Declaration
public ConcurrentDictionary<string, ServerEventCallback> NamedReceivers { get; }

ReceiverTypes

View Source
Declaration
public List<Type> ReceiverTypes { get; }

StrictMode

View Source
Declaration
public bool StrictMode { get; set; }

Fields

BufferSize

View Source
Declaration
public static int BufferSize

OnConnect

View Source
Declaration
public Action<ServerEventConnect> OnConnect

OnJoin

View Source
Declaration
public Action<ServerEventJoin> OnJoin

OnLeave

View Source
Declaration
public Action<ServerEventLeave> OnLeave

OnUpdate

View Source
Declaration
public Action<ServerEventUpdate> OnUpdate

OnCommand

View Source
Declaration
public Action<ServerEventMessage> OnCommand

OnMessage

View Source
Declaration
public Action<ServerEventMessage> OnMessage

OnHeartbeat

View Source
Declaration
public Action OnHeartbeat

OnReconnect

View Source
Declaration
public Action OnReconnect

OnException

View Source
Declaration
public Action<Exception> OnException

Methods

Start()

View Source
Declaration
public ServerEventsClient Start()
Returns

ServiceStack.ServerEventsClient

Connect()

View Source
Declaration
public Task<ServerEventConnect> Connect()
Returns

System.Threading.Tasks.Task<ServiceStack.ServerEventConnect>

WaitForNextCommand()

View Source
Declaration
public Task<ServerEventCommand> WaitForNextCommand()
Returns

System.Threading.Tasks.Task<ServiceStack.ServerEventCommand>

WaitForNextHeartbeat()

View Source
Declaration
public Task<ServerEventHeartbeat> WaitForNextHeartbeat()
Returns

System.Threading.Tasks.Task<ServiceStack.ServerEventHeartbeat>

WaitForNextMessage()

View Source
Declaration
public Task<ServerEventMessage> WaitForNextMessage()
Returns

System.Threading.Tasks.Task<ServiceStack.ServerEventMessage>

OnConnectReceived()

View Source
Declaration
protected void OnConnectReceived()

StartNewHeartbeat()

View Source
Declaration
protected void StartNewHeartbeat()

Heartbeat(Object)

View Source
Declaration
protected void Heartbeat(object state)
Parameters
TypeName
System.Objectstate

OnJoinReceived(ServerEventJoin)

View Source
Declaration
protected void OnJoinReceived(ServerEventJoin e)
Parameters
TypeName
ServiceStack.ServerEventJoine

OnLeaveReceived(ServerEventLeave)

View Source
Declaration
protected void OnLeaveReceived(ServerEventLeave e)
Parameters
TypeName
ServiceStack.ServerEventLeavee

OnUpdateReceived(ServerEventUpdate)

View Source
Declaration
protected void OnUpdateReceived(ServerEventUpdate e)
Parameters
TypeName
ServiceStack.ServerEventUpdatee

OnCommandReceived(ServerEventCommand)

View Source
Declaration
protected void OnCommandReceived(ServerEventCommand e)
Parameters
TypeName
ServiceStack.ServerEventCommande

OnHeartbeatReceived(ServerEventHeartbeat)

View Source
Declaration
protected void OnHeartbeatReceived(ServerEventHeartbeat e)
Parameters
TypeName
ServiceStack.ServerEventHeartbeate

OnMessageReceived(ServerEventMessage)

View Source
Declaration
protected void OnMessageReceived(ServerEventMessage e)
Parameters
TypeName
ServiceStack.ServerEventMessagee

OnExceptionReceived(Exception)

View Source
Declaration
protected void OnExceptionReceived(Exception ex)
Parameters
TypeName
System.Exceptionex

Restart()

View Source
Declaration
public void Restart()

ProcessResponse(Stream)

View Source
Declaration
public void ProcessResponse(Stream stream)
Parameters
TypeName
System.IO.Streamstream

ProcessLine(String)

View Source
Declaration
public void ProcessLine(string line)
Parameters
TypeName
System.Stringline

ToTypedMessage(ServerEventMessage)

View Source
Declaration
public static ServerEventMessage ToTypedMessage(ServerEventMessage e)
Returns

ServiceStack.ServerEventMessage

Parameters
TypeName
ServiceStack.ServerEventMessagee

Stop()

View Source
Declaration
public virtual Task Stop()
Returns

System.Threading.Tasks.Task

InternalStop()

View Source
Declaration
public virtual Task InternalStop()
Returns

System.Threading.Tasks.Task

Update(String[], String[])

View Source
Declaration
public void Update(string[] subscribe = null, string[] unsubscribe = null)
Parameters
TypeName
System.String[]subscribe
System.String[]unsubscribe

AddListener(String, Action<ServerEventMessage>)

View Source
Declaration
public ServerEventsClient AddListener(string eventName, Action<ServerEventMessage> handler)
Returns

ServiceStack.ServerEventsClient

Parameters
TypeName
System.StringeventName
System.Action<ServiceStack.ServerEventMessage>handler

RemoveListener(String, Action<ServerEventMessage>)

View Source
Declaration
public ServerEventsClient RemoveListener(string eventName, Action<ServerEventMessage> handler)
Returns

ServiceStack.ServerEventsClient

Parameters
TypeName
System.StringeventName
System.Action<ServiceStack.ServerEventMessage>handler

RemoveListeners(String)

View Source
Declaration
public ServerEventsClient RemoveListeners(string eventName)
Returns

ServiceStack.ServerEventsClient

Parameters
TypeName
System.StringeventName

HasListener(String, Action<ServerEventMessage>)

View Source
Declaration
public bool HasListener(string eventName, Action<ServerEventMessage> handler)
Returns

System.Boolean

Parameters
TypeName
System.StringeventName
System.Action<ServiceStack.ServerEventMessage>handler

HasListeners(String)

View Source
Declaration
public bool HasListeners(string eventName)
Returns

System.Boolean

Parameters
TypeName
System.StringeventName

RaiseEvent(String, ServerEventMessage)

View Source
Declaration
public void RaiseEvent(string eventName, ServerEventMessage message)
Parameters
TypeName
System.StringeventName
ServiceStack.ServerEventMessagemessage

RemoveAllListeners()

View Source
Declaration
public void RemoveAllListeners()

RemoveAllRegistrations()

Removes all registered Handlers, Named Receivers and Listeners

View Source
Declaration
public void RemoveAllRegistrations()

GetStatsDescription()

View Source
Declaration
public virtual string GetStatsDescription()
Returns

System.String

Dispose()

View Source
Declaration
public void Dispose()

RegisterReceiver<T>()

View Source
Declaration
public ServerEventsClient RegisterReceiver<T>()
where T : IReceiver
Returns

ServiceStack.ServerEventsClient

Type Parameters
  • T

RegisterNamedReceiver<T>(String)

View Source
Declaration
public ServerEventsClient RegisterNamedReceiver<T>(string receiverName)
where T : IReceiver
Returns

ServiceStack.ServerEventsClient

Parameters
TypeName
System.StringreceiverName
Type Parameters
  • T

Implements

  • System.IDisposable