C# Class Assets.Scripts.Services.Communication.WebSocketService

Inheritance: MonoSingleton
Afficher le fichier Open project: maximecharron/GLO-3002-Frima Class Usage Examples

Méthodes publiques

Méthode Description
AddInboundInterceptor ( ICommandInterceptor interceptor, Type commandType ) : void
AddOutboundInterceptor ( ICommandInterceptor interceptor, Type commandType ) : void
Connect ( ) : void
OnDestroy ( ) : void
RegisterCommand ( string commandName, Action callbackMethod, Type dtoType ) : void
SendCommand ( CommandDTO commandDTO, bool interceptable = true ) : void
UnregisterCommand ( string commandName, Action callbackMethod ) : void

Private Methods

Méthode Description
DispatchBufferedCommands ( ) : void
DispatchCommand ( string jsonData ) : bool
DispatchIncomingCommandToInterceptors ( CommandDTO commandDTO ) : bool
DispatchOutgoingCommandToInterceptors ( CommandDTO commandDTO ) : bool
KeepConnectionAlive ( ) : void
ReceiveCommands ( ) : void
Start ( ) : void
Update ( ) : void

Method Details

AddInboundInterceptor() public méthode

public AddInboundInterceptor ( ICommandInterceptor interceptor, Type commandType ) : void
interceptor ICommandInterceptor
commandType System.Type
Résultat void

AddOutboundInterceptor() public méthode

public AddOutboundInterceptor ( ICommandInterceptor interceptor, Type commandType ) : void
interceptor ICommandInterceptor
commandType System.Type
Résultat void

Connect() public méthode

public Connect ( ) : void
Résultat void

OnDestroy() public méthode

public OnDestroy ( ) : void
Résultat void

RegisterCommand() public méthode

public RegisterCommand ( string commandName, Action callbackMethod, Type dtoType ) : void
commandName string
callbackMethod Action
dtoType System.Type
Résultat void

SendCommand() public méthode

public SendCommand ( CommandDTO commandDTO, bool interceptable = true ) : void
commandDTO Assets.Scripts.Services.Communication.DTOs.CommandDTO
interceptable bool
Résultat void

UnregisterCommand() public méthode

public UnregisterCommand ( string commandName, Action callbackMethod ) : void
commandName string
callbackMethod Action
Résultat void