#if !BESTHTTP_DISABLE_SIGNALR namespace BestHTTP.SignalR { /// /// Possible transport types. /// public enum TransportTypes { /// /// Transport using WebSockets. /// WebSocket, /// /// Transport using ServerSentEvents protocol. /// ServerSentEvents, /// /// Transport using long-polling requests. /// LongPoll } /// /// Server sent message types /// public enum MessageTypes { /// /// An empty json object {} sent by the server to check keep alive. /// KeepAlive, /// /// A no-hub message that contains data. /// Data, /// /// A message that can hold multiple data message alongside with other information. /// Multiple, /// /// A method call result. /// Result, /// /// A message about a failed method call. /// Failure, /// /// A message with all information to be able to call a method on the client. /// MethodCall, /// /// A long running server-method's progress. /// Progress } /// /// Possible SignalR Connection states. /// public enum ConnectionStates { /// /// The initial state of the connection. /// Initial, /// /// The client authenticates itself with the server. This state is skipped if no AuthenticationProvider is present. /// Authenticating, /// /// The client sent out the negotiation request to the server. /// Negotiating, /// /// The client received the negotiation data, created the transport and wait's for the transport's connection. /// Connecting, /// /// The transport connected and started successfully. /// Connected, /// /// The client started the reconnect process. /// Reconnecting, /// /// The connection is closed. /// Closed } /// /// Possible types of SignalR requests. /// public enum RequestTypes { /// /// Request to the /negotiate path to negotiate protocol parameters. /// Negotiate, /// /// Request to the /connect path to connect to the server. With long-polling, it's like a regular poll request. /// Connect, /// /// Request to the /start path to start the protocol. /// Start, /// /// Request to the /poll path to get new messages. Not used with the WebSocketTransport. /// Poll, /// /// Request to the /send path to send a message to the server. Not used with the WebSocketTransport. /// Send, /// /// Request to the /reconnect path to initiate a reconnection. It's used instead of the Connect type. /// Reconnect, /// /// Request to the /abort path to close the connection. /// Abort, /// /// Request to the /ping path to ping the server keeping the asp.net session alive. /// Ping } /// /// Possible states of a transport. /// public enum TransportStates { /// /// Initial state /// Initial, /// /// Connecting /// Connecting, /// /// Reconnecting /// Reconnecting, /// /// Sending Start request /// Starting, /// /// Start request finished successfully /// Started, /// /// Sending Abort request /// Closing, /// /// The transport closed after Abort request sent /// Closed } } #endif