Protocol Class |
Namespace: Crosser.Server.Modules.Protocol
public abstract class Protocol : IProtocol, IDisposable
The Protocol type exposes the following members.
Name | Description | |
---|---|---|
![]() | AuthRequired |
True if the IBaseEndpoint requires authentication
|
![]() | ClientStats |
Clients statistics
|
![]() | ConnectionContext |
Connection information IConnectionContext |
![]() | Controllers |
The controller instances used by this connection
|
![]() | ProtocolIdentifier |
Identifier for the protocol, passed into the ctor from implementing protocols
|
![]() | PubSubHandler | IPubSubHandler module
|
![]() | Server |
Reference to the IServer |
![]() | Subscriptions |
Current subscriptions for this connection
|
![]() | Transport | IBaseTransport for the protocol
|
Name | Description | |
---|---|---|
![]() | Dispose |
Clean up the usage of controllers for the connection
|
![]() | EnsureController |
Makes sure that there is an instance of a specific controller.
Also makes sure that security is in place. Knowing what methods the connection can call.
|
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | ExecuteCall |
Invoke the correct RPC controller/method with the payload.
Also handles return values when needed
|
![]() | ExecuteCallSynchronously |
Invoke the correct RPC controller/method with the payload.
Also handles return values when needed
Will execute 1 operation at the time. Other operations will wait.
This will be executed when the IController or the method being invoked is decorated with the RunSynchronouslyAttribute |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | FlushTransport |
Flushes the IBaseTransport write stream
|
![]() | GetControllerDelegate |
Creates a ControllerDelegate to use when calling the controller/method
|
![]() | GetDeadConnectionFrame |
Sent to clients when ping has failed more times than allowed
|
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetPingFrame |
Each protocol is responsible for returning a valid ping frame for that protocol
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | HasControllerInstanceOf |
True if the controllers repository has a instance of the specific BinaryKey |
![]() | InitClientStats |
Setup the properties on the ClientStats object
|
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ReadLoop |
Each protocol should implement a read loop
|
![]() | RemoveController |
Removes a controller instance from the Controllers repository.
|
![]() | Send(Byte) |
Enqueue the data to send and update the IServerStatistics |
![]() | Send(BinaryKey, String, Byte) |
Each protocol is responsible for building the message to send
|
![]() | Send(Byte, Byte, Byte, Byte) | |
![]() | SendLoop |
Send loop that reads the OutQueue |
![]() | StartPing |
If heartbeat is enabled on this endpoint the method will initiate a ping/pong sequence
|
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() | callbackId |
Buffer for callback-id.
|
![]() | callbackIdPos |
Length to read from callbackId |
![]() | Cancellation |
CancellationToken used in communication
|
![]() | CloseReason |
Reason CloseReason for closing the connection
|
![]() | controller |
Controller buffer, controller to call is within
|
![]() | controllerPos |
The length to read from the controller |
![]() | controllerToCall |
Cache controller since it will save time when same controller is called for each message
|
![]() | data |
Last byte operation read from the IBaseTransport |
![]() | disposed |
Flag for knowing if the object has been disposed
|
![]() | iam |
Buffer for the IAM message operation
|
![]() | iampos |
Size of the IAM message
|
![]() | InQueue |
Queue for incoming data
|
![]() | Interactive |
If true the protocol will respond with +OK messages for every valid operation. Only possible for full-duplex connections.
|
![]() | IsAuthenticated |
True if the Authenticate(IProtocol) method returned true
|
![]() | lastControllerAsByte |
Cache for last controller called
|
![]() | lastControllerKey |
Cache for the last controller called as BinaryKey |
![]() | lastMethodAsByte |
Cache for last method called
|
![]() | lastMethodKey |
Cache for the last method called as BinaryKey |
![]() | len |
Length to read from the IBaseTransport |
![]() | locker |
For blocking simultaneous access to certain areas
|
![]() | method |
Method buffer, method to call is within
|
![]() | methodPos |
The length to read from the method |
![]() | methodToCall |
Information about the method to be called ControllerDelegate |
![]() | OutQueue |
Queue for outgoing data
|
![]() | PubQueue |
Queue for messages published over a pub/sub pattern
|
![]() | read |
Read buffer
|
![]() | ReadState |
The ReadState for the ReadLoop
|
![]() | run |
The readloop will continue as long as this flag is true.
When false the connection will be disposed
|
![]() | size |
Size buffer
|
![]() | sizepos |
Size position (for knowing size to read from size buffer)
|
![]() | topic |
Topic parsed from the stream
|
![]() | topicpos |
Length of the topic
|
![]() | unsubcount |
Max messages to publish before doing automatic unsubscribe
|
![]() | unsubcountpos |
Length of unsub-count
|
![]() | validTopic |
Flag for knowing if the topic parsed is valid
|
![]() | write |
Write buffer
|