C# Class Discord.Net.WebSockets.VoiceSocket

Inheritance: Discord.Net.WebSockets.WebSocket
显示文件 Open project: RogueException/Discord.Net Class Usage Examples

Private Properties

Property Type Description
OnFrameReceived void
OnUserIsSpeaking void
ReceiveVoiceAsync Task
Reconnect Task
SendVoiceAsync Task
VoiceSocket Discord.API.Client
WatcherAsync Task

Public Methods

Method Description
ClearPCMFrames ( ) : void
Connect ( string host, string token, ulong userId, string sessionId, CancellationToken parentCancelToken ) : Task
Disconnect ( ) : Task
SendHeartbeat ( ) : void
SendIdentify ( ulong id, string sessionId ) : void
SendPCMFrames ( byte data, int offset, int count ) : void
SendSelectProtocol ( string externalAddress, int externalPort ) : void
SendSetSpeaking ( bool value ) : void
WaitForQueue ( ) : void

Protected Methods

Method Description
Cleanup ( ) : Task
ProcessMessage ( string json ) : Task
Run ( ) : Task

Private Methods

Method Description
OnFrameReceived ( ulong userId, ulong channelId, byte buffer, int offset, int count ) : void
OnUserIsSpeaking ( ulong userId, bool isSpeaking ) : void
ReceiveVoiceAsync ( CancellationToken cancelToken ) : Task
Reconnect ( ) : Task
SendVoiceAsync ( CancellationToken cancelToken ) : Task
VoiceSocket ( DiscordConfig config, Discord.Audio.AudioServiceConfig audioConfig, JsonSerializer serializer, Logger logger ) : Discord.API.Client
WatcherAsync ( ) : Task

Method Details

Cleanup() protected method

protected Cleanup ( ) : Task
return Task

ClearPCMFrames() public method

public ClearPCMFrames ( ) : void
return void

Connect() public method

public Connect ( string host, string token, ulong userId, string sessionId, CancellationToken parentCancelToken ) : Task
host string
token string
userId ulong
sessionId string
parentCancelToken System.Threading.CancellationToken
return Task

Disconnect() public method

public Disconnect ( ) : Task
return Task

ProcessMessage() protected method

protected ProcessMessage ( string json ) : Task
json string
return Task

Run() protected method

protected Run ( ) : Task
return Task

SendHeartbeat() public method

public SendHeartbeat ( ) : void
return void

SendIdentify() public method

public SendIdentify ( ulong id, string sessionId ) : void
id ulong
sessionId string
return void

SendPCMFrames() public method

public SendPCMFrames ( byte data, int offset, int count ) : void
data byte
offset int
count int
return void

SendSelectProtocol() public method

public SendSelectProtocol ( string externalAddress, int externalPort ) : void
externalAddress string
externalPort int
return void

SendSetSpeaking() public method

public SendSetSpeaking ( bool value ) : void
value bool
return void

WaitForQueue() public method

public WaitForQueue ( ) : void
return void