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
Mostra file Open project: martindevans/MumbleSharp

Protected Properties

Property Type Description
ChannelDictionary Channel>.ConcurrentDictionary
UserDictionary User>.ConcurrentDictionary

Public Methods

Method 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

Protected Methods

Method 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

Method Description
EncodingThreadEntry ( ) : void

Method Details

BasicMumbleProtocol() public method

public BasicMumbleProtocol ( ) : System
return System

ChannelJoined() protected method

protected ChannelJoined ( MumbleSharp.Model.Channel channel ) : void
channel MumbleSharp.Model.Channel
return void

ChannelLeft() protected method

protected ChannelLeft ( MumbleSharp.Model.Channel channel ) : void
channel MumbleSharp.Model.Channel
return void

ChannelMessageReceived() protected method

protected ChannelMessageReceived ( MumbleSharp.Model.ChannelMessage message ) : void
message MumbleSharp.Model.ChannelMessage
return void

ChannelRemove() public method

Server has removed a channel
public ChannelRemove ( ChannelRemove channelRemove ) : void
channelRemove ChannelRemove
return void

ChannelState() public method

Server has changed some detail of a channel
public ChannelState ( ChannelState channelState ) : void
channelState ChannelState
return void

Close() public method

public Close ( ) : void
return void

CodecVersion() public method

public CodecVersion ( CodecVersion codecVersion ) : void
codecVersion CodecVersion
return void

ContextAction() public method

public ContextAction ( ContextAction contextAction ) : void
contextAction ContextAction
return void

ContextActionModify() public method

public ContextActionModify ( MumbleProto.ContextActionModify contextActionModify ) : void
contextActionModify MumbleProto.ContextActionModify
return void

EncodedVoice() public method

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
return void

GetCodec() public method

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

Initialise() public method

Associates this protocol with an opening mumble connection
public Initialise ( MumbleConnection connection ) : void
connection MumbleConnection
return void

PermissionQuery() public method

public PermissionQuery ( PermissionQuery permissionQuery ) : void
permissionQuery PermissionQuery
return void

PersonalMessageReceived() protected method

protected PersonalMessageReceived ( MumbleSharp.Model.PersonalMessage message ) : void
message MumbleSharp.Model.PersonalMessage
return void

Ping() public method

Received a ping over the TCP connection
public Ping ( Ping ping ) : void
ping Ping
return void

SelectCertificate() public method

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
return System.Security.Cryptography.X509Certificates.X509Certificate

SendVoice() public method

public SendVoice ( ArraySegment pcm, SpeechTarget target, uint targetId ) : void
pcm ArraySegment
target SpeechTarget
targetId uint
return void

SendVoiceStop() public method

public SendVoiceStop ( ) : void
return void

ServerConfig() public method

Some detail of the server configuration has changed
public ServerConfig ( ServerConfig serverConfig ) : void
serverConfig ServerConfig
return void

ServerSync() public method

Initial connection to the server
public ServerSync ( ServerSync serverSync ) : void
serverSync ServerSync
return void

SuggestConfig() public method

public SuggestConfig ( SuggestConfig config ) : void
config SuggestConfig
return void

TextMessage() public method

Received a text message from the server
public TextMessage ( TextMessage textMessage ) : void
textMessage TextMessage
return void

UdpPing() public method

Received a UDP ping from the server
public UdpPing ( byte packet ) : void
packet byte
return void

UserJoined() protected method

protected UserJoined ( MumbleSharp.Model.User user ) : void
user MumbleSharp.Model.User
return void

UserLeft() protected method

protected UserLeft ( MumbleSharp.Model.User user ) : void
user MumbleSharp.Model.User
return void

UserList() public method

public UserList ( UserList userList ) : void
userList UserList
return void

UserRemove() public method

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

UserState() public method

Server has changed some detail of a user
public UserState ( UserState userState ) : void
userState UserState
return void

ValidateCertificate() public method

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
return bool

Version() public method

Server has sent a version update
public Version ( MumbleProto.Version version ) : void
version MumbleProto.Version
return void

Property Details

ChannelDictionary protected_oe property

protected ConcurrentDictionary ChannelDictionary
return Channel>.ConcurrentDictionary

UserDictionary protected_oe property

protected ConcurrentDictionary UserDictionary
return User>.ConcurrentDictionary