C# Class MumbleSharp.BasicMumbleProtocol

A basic mumble protocol which handles events from the server - override the individual handler methods to replace/extend the default behaviour
Inheritance: IMumbleProtocol
Afficher le fichier Open project: martindevans/MumbleSharp

Protected Properties

Свойство Type Description
ChannelDictionary Channel>.ConcurrentDictionary
UserDictionary User>.ConcurrentDictionary

Méthodes publiques

Méthode Description
BasicMumbleProtocol ( ) : System
ChannelRemove ( ChannelRemove channelRemove ) : void

Server has removed a channel

ChannelState ( ChannelState channelState ) : void

Server has changed some detail of a channel

Close ( ) : void
CodecVersion ( CodecVersion codecVersion ) : void
ContextAction ( ContextAction contextAction ) : void
ContextActionModify ( MumbleProto.ContextActionModify contextActionModify ) : void
EncodedVoice ( byte data, uint userId, long sequence, IVoiceCodec codec, SpeechTarget target ) : void

Received a voice packet from the server

GetCodec ( uint session, SpeechCodecs codec ) : IVoiceCodec

Get a voice decoder for the specified user/codec combination

Initialise ( MumbleConnection connection ) : void

Associates this protocol with an opening mumble connection

PermissionQuery ( PermissionQuery permissionQuery ) : void
Ping ( Ping ping ) : void

Received a ping over the TCP connection

SelectCertificate ( object sender, string targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string acceptableIssuers ) : X509Certificate
SendVoice ( ArraySegment pcm, SpeechTarget target, uint targetId ) : void
SendVoiceStop ( ) : void
ServerConfig ( ServerConfig serverConfig ) : void

Some detail of the server configuration has changed

ServerSync ( ServerSync serverSync ) : void

Initial connection to the server

SuggestConfig ( SuggestConfig config ) : void
TextMessage ( TextMessage textMessage ) : void

Received a text message from the server

UdpPing ( byte packet ) : void

Received a UDP ping from the server

UserList ( UserList userList ) : void
UserRemove ( UserRemove userRemove ) : void

A user has been removed from the server (left, kicked or banned)

UserState ( UserState userState ) : void

Server has changed some detail of a user

ValidateCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors ) : bool

Validate the certificate the server sends for itself. By default this will acept *all* certificates

Version ( MumbleProto.Version version ) : void

Server has sent a version update

Méthodes protégées

Méthode Description
ChannelJoined ( MumbleSharp.Model.Channel channel ) : void
ChannelLeft ( MumbleSharp.Model.Channel channel ) : void
ChannelMessageReceived ( MumbleSharp.Model.ChannelMessage message ) : void
PersonalMessageReceived ( MumbleSharp.Model.PersonalMessage message ) : void
UserJoined ( MumbleSharp.Model.User user ) : void
UserLeft ( MumbleSharp.Model.User user ) : void

Private Methods

Méthode Description
EncodingThreadEntry ( ) : void

Method Details

BasicMumbleProtocol() public méthode

public BasicMumbleProtocol ( ) : System
Résultat System

ChannelJoined() protected méthode

protected ChannelJoined ( MumbleSharp.Model.Channel channel ) : void
channel MumbleSharp.Model.Channel
Résultat void

ChannelLeft() protected méthode

protected ChannelLeft ( MumbleSharp.Model.Channel channel ) : void
channel MumbleSharp.Model.Channel
Résultat void

ChannelMessageReceived() protected méthode

protected ChannelMessageReceived ( MumbleSharp.Model.ChannelMessage message ) : void
message MumbleSharp.Model.ChannelMessage
Résultat void

ChannelRemove() public méthode

Server has removed a channel
public ChannelRemove ( ChannelRemove channelRemove ) : void
channelRemove ChannelRemove
Résultat void

ChannelState() public méthode

Server has changed some detail of a channel
public ChannelState ( ChannelState channelState ) : void
channelState ChannelState
Résultat void

Close() public méthode

public Close ( ) : void
Résultat void

CodecVersion() public méthode

public CodecVersion ( CodecVersion codecVersion ) : void
codecVersion CodecVersion
Résultat void

ContextAction() public méthode

public ContextAction ( ContextAction contextAction ) : void
contextAction ContextAction
Résultat void

ContextActionModify() public méthode

public ContextActionModify ( MumbleProto.ContextActionModify contextActionModify ) : void
contextActionModify MumbleProto.ContextActionModify
Résultat void

EncodedVoice() public méthode

Received a voice packet from the server
public EncodedVoice ( byte data, uint userId, long sequence, IVoiceCodec codec, SpeechTarget target ) : void
data byte
userId uint
sequence long
codec IVoiceCodec
target SpeechTarget
Résultat void

GetCodec() public méthode

Get a voice decoder for the specified user/codec combination
public GetCodec ( uint session, SpeechCodecs codec ) : IVoiceCodec
session uint
codec SpeechCodecs
Résultat IVoiceCodec

Initialise() public méthode

Associates this protocol with an opening mumble connection
public Initialise ( MumbleConnection connection ) : void
connection MumbleConnection
Résultat void

PermissionQuery() public méthode

public PermissionQuery ( PermissionQuery permissionQuery ) : void
permissionQuery PermissionQuery
Résultat void

PersonalMessageReceived() protected méthode

protected PersonalMessageReceived ( MumbleSharp.Model.PersonalMessage message ) : void
message MumbleSharp.Model.PersonalMessage
Résultat void

Ping() public méthode

Received a ping over the TCP connection
public Ping ( Ping ping ) : void
ping Ping
Résultat void

SelectCertificate() public méthode

public SelectCertificate ( object sender, string targetHost, X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string acceptableIssuers ) : X509Certificate
sender object
targetHost string
localCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
remoteCertificate System.Security.Cryptography.X509Certificates.X509Certificate
acceptableIssuers string
Résultat System.Security.Cryptography.X509Certificates.X509Certificate

SendVoice() public méthode

public SendVoice ( ArraySegment pcm, SpeechTarget target, uint targetId ) : void
pcm ArraySegment
target SpeechTarget
targetId uint
Résultat void

SendVoiceStop() public méthode

public SendVoiceStop ( ) : void
Résultat void

ServerConfig() public méthode

Some detail of the server configuration has changed
public ServerConfig ( ServerConfig serverConfig ) : void
serverConfig ServerConfig
Résultat void

ServerSync() public méthode

Initial connection to the server
public ServerSync ( ServerSync serverSync ) : void
serverSync ServerSync
Résultat void

SuggestConfig() public méthode

public SuggestConfig ( SuggestConfig config ) : void
config SuggestConfig
Résultat void

TextMessage() public méthode

Received a text message from the server
public TextMessage ( TextMessage textMessage ) : void
textMessage TextMessage
Résultat void

UdpPing() public méthode

Received a UDP ping from the server
public UdpPing ( byte packet ) : void
packet byte
Résultat void

UserJoined() protected méthode

protected UserJoined ( MumbleSharp.Model.User user ) : void
user MumbleSharp.Model.User
Résultat void

UserLeft() protected méthode

protected UserLeft ( MumbleSharp.Model.User user ) : void
user MumbleSharp.Model.User
Résultat void

UserList() public méthode

public UserList ( UserList userList ) : void
userList UserList
Résultat void

UserRemove() public méthode

A user has been removed from the server (left, kicked or banned)
public UserRemove ( UserRemove userRemove ) : void
userRemove UserRemove
Résultat void

UserState() public méthode

Server has changed some detail of a user
public UserState ( UserState userState ) : void
userState UserState
Résultat void

ValidateCertificate() public méthode

Validate the certificate the server sends for itself. By default this will acept *all* certificates
public ValidateCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors ) : bool
sender object
certificate System.Security.Cryptography.X509Certificates.X509Certificate
chain System.Security.Cryptography.X509Certificates.X509Chain
errors SslPolicyErrors
Résultat bool

Version() public méthode

Server has sent a version update
public Version ( MumbleProto.Version version ) : void
version MumbleProto.Version
Résultat void

Property Details

ChannelDictionary protected_oe property

protected ConcurrentDictionary ChannelDictionary
Résultat Channel>.ConcurrentDictionary

UserDictionary protected_oe property

protected ConcurrentDictionary UserDictionary
Résultat User>.ConcurrentDictionary