Gin
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
WebSocket Class Reference

Public Types

enum  ReadyStateValues { CLOSING , CLOSED , OPEN }
 

Public Member Functions

 ~WebSocket ()
 
bool readIncoming ()
 
void poll (int timeout=0)
 
void send (const juce::String &message)
 
void sendBinary (const juce::String &message)
 
void sendBinary (const juce::MemoryBlock &message)
 
void sendPing ()
 
void close ()
 
ReadyStateValues getReadyState () const
 
void dispatch (std::function< void(const juce::MemoryBlock &message, bool isBinary)> callback)
 

Static Public Member Functions

static WebSocketfromURL (const juce::String &url, const juce::String &origin={})
 
static WebSocketfromURLNoMask (const juce::String &url, const juce::String &origin={})
 
static WebSocketfromURL (const juce::String &url, bool useMask, const juce::String &origin)
 
static WebSocketfromURL (const juce::String &url, const juce::String &origin, const juce::StringPairArray &customHeaders)
 

Public Attributes

ReadyStateValues readyStateValues
 

Member Enumeration Documentation

◆ ReadyStateValues

Enumerator
CLOSING 
CLOSED 
OPEN 

Constructor & Destructor Documentation

◆ ~WebSocket()

WebSocket::~WebSocket ( )

Member Function Documentation

◆ fromURL() [1/3]

static WebSocket* WebSocket::fromURL ( const juce::String &  url,
const juce::String &  origin = {} 
)
static

◆ fromURLNoMask()

static WebSocket* WebSocket::fromURLNoMask ( const juce::String &  url,
const juce::String &  origin = {} 
)
static

◆ fromURL() [2/3]

static WebSocket* WebSocket::fromURL ( const juce::String &  url,
bool  useMask,
const juce::String &  origin 
)
static

◆ fromURL() [3/3]

static WebSocket* WebSocket::fromURL ( const juce::String &  url,
const juce::String &  origin,
const juce::StringPairArray &  customHeaders 
)
static

◆ readIncoming()

bool WebSocket::readIncoming ( )

◆ poll()

void WebSocket::poll ( int  timeout = 0)

◆ send()

void WebSocket::send ( const juce::String &  message)

◆ sendBinary() [1/2]

void WebSocket::sendBinary ( const juce::String &  message)

◆ sendBinary() [2/2]

void WebSocket::sendBinary ( const juce::MemoryBlock &  message)

◆ sendPing()

void WebSocket::sendPing ( )

◆ close()

void WebSocket::close ( )

◆ getReadyState()

ReadyStateValues WebSocket::getReadyState ( ) const

◆ dispatch()

void WebSocket::dispatch ( std::function< void(const juce::MemoryBlock &message, bool isBinary)>  callback)

Member Data Documentation

◆ readyStateValues

ReadyStateValues WebSocket::readyStateValues

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