Esempio n. 1
0
 public static BaseCommand ToBaseCommand(this CommandAuthResponse value)
 {
     return(new BaseCommand
     {
         type = BaseCommand.Type.AuthResponse,
         authResponse = value
     });
 }
Esempio n. 2
0
        public static ReadOnlySequence <byte> NewAuthResponse(string authMethod, AuthData clientData, int clientProtocolVersion, string clientVersion)
        {
            var authData = new AuthData {
                auth_data = clientData.auth_data, AuthMethodName = authMethod
            };

            var response = new CommandAuthResponse
            {
                Response        = authData,
                ProtocolVersion = clientProtocolVersion,
                ClientVersion   = clientVersion ?? "Pulsar Client"
            };

            return(Serializer.Serialize(response.ToBaseCommand()));
        }