discord-haskell-voice-2.3.0: Voice support for discord-haskell.
Copyright(c) Yuto Takano (2021)
LicenseMIT
Maintainermoa17stock@gmail.com
Safe HaskellNone
LanguageHaskell2010

Discord.Internal.Voice.UDPLoop

Description

WARNING

This module is considered internal.

The Package Versioning Policy does not apply.

The contents of this module may change in any way whatsoever and without any warning between minor versions of this package.

Description

This module provides launchUdp, a function used to start a UDP socket and perform initial handshaking with the Discord Voice UDP Endpoint. It will continuously encrypt and send the OPUS voice packets as received through the specified Chan. This function is called automatically by launchWebsocket.

Synopsis

Documentation

launchUdp :: UDPLaunchOpts -> Chan Text -> IO () Source #

Starts the UDP connection, performs IP discovery, writes the result to the receivables channel, and then starts an eternal loop of sending and receiving packets.