Gin
Public Member Functions | Public Attributes | List of all members
AsyncWebsocket Class Reference

Inherits juce::Thread.

Public Member Functions

 AsyncWebsocket (const juce::URL url, const juce::StringPairArray &customHeaders={})
 
 ~AsyncWebsocket () override
 
void connect ()
 
void disconnect ()
 
bool isConnected ()
 
void setPingInterval (int seconds)
 
void send (const juce::String &text)
 
void send (const juce::MemoryBlock &binary)
 
void sendPing ()
 

Public Attributes

std::function< void()> onConnect
 
std::function< void()> onDisconnect
 
std::function< void(const juce::String &)> onText
 
std::function< void(const juce::MemoryBlock &)> onBinary
 

Constructor & Destructor Documentation

◆ AsyncWebsocket()

AsyncWebsocket::AsyncWebsocket ( const juce::URL  url,
const juce::StringPairArray &  customHeaders = {} 
)

◆ ~AsyncWebsocket()

AsyncWebsocket::~AsyncWebsocket ( )
override

Member Function Documentation

◆ connect()

void AsyncWebsocket::connect ( )

◆ disconnect()

void AsyncWebsocket::disconnect ( )

◆ isConnected()

bool AsyncWebsocket::isConnected ( )

◆ setPingInterval()

void AsyncWebsocket::setPingInterval ( int  seconds)

◆ send() [1/2]

void AsyncWebsocket::send ( const juce::String &  text)

◆ send() [2/2]

void AsyncWebsocket::send ( const juce::MemoryBlock &  binary)

◆ sendPing()

void AsyncWebsocket::sendPing ( )

Member Data Documentation

◆ onConnect

std::function<void ()> AsyncWebsocket::onConnect

◆ onDisconnect

std::function<void ()> AsyncWebsocket::onDisconnect

◆ onText

std::function<void (const juce::String&)> AsyncWebsocket::onText

◆ onBinary

std::function<void (const juce::MemoryBlock&)> AsyncWebsocket::onBinary

The documentation for this class was generated from the following file: