Ardour  8.7-15-gadf511264b
ArdourSurface::WebsocketsServer Class Reference

#include <server.h>

Inheritance diagram for ArdourSurface::WebsocketsServer:
[legend]

Classes

struct  LwsPollFdGlibSource
 

Public Member Functions

 WebsocketsServer (ArdourSurface::ArdourWebsockets &)
 
virtual ~WebsocketsServer ()
 
int start ()
 
int stop ()
 
void update_client (Client, const NodeState &, bool)
 
void update_all_clients (const NodeState &, bool)
 
bool read_blocks_event_loop ()
 
- Public Member Functions inherited from ArdourSurface::SurfaceComponent
 SurfaceComponent (ArdourSurface::ArdourWebsockets &surface)
 
virtual ~SurfaceComponent ()
 
BasicUIbasic_ui () const
 
virtual PBD::EventLoopevent_loop () const
 
Glib::RefPtr< Glib::MainLoop > main_loop () const
 
ARDOUR::Sessionsession () const
 
ArdourMixermixer () const
 
ArdourTransporttransport () const
 
WebsocketsServerserver () const
 
WebsocketsDispatcherdispatcher () const
 

Private Types

typedef boost::unordered_map< Client, ClientContextClientContextMap
 
typedef boost::unordered_map< lws_sockfd_type, LwsPollFdGlibSourceLwsPollFdGlibSourceMap
 

Private Member Functions

int add_client (Client)
 
int del_client (Client)
 
int recv_client (Client, void *, size_t)
 
int write_client (Client)
 
int send_availsurf_hdr (Client)
 
int send_availsurf_body (Client)
 
void request_write (Client)
 
bool fd_callbacks ()
 
int add_poll_fd (struct lws_pollargs *)
 
int mod_poll_fd (struct lws_pollargs *)
 
int del_poll_fd (struct lws_pollargs *)
 
bool io_handler (Glib::IOCondition, lws_sockfd_type)
 
Glib::IOCondition events_to_ioc (int)
 
int ioc_to_events (Glib::IOCondition)
 

Static Private Member Functions

static int lws_callback (struct lws *, enum lws_callback_reasons, void *, void *, size_t)
 
static gboolean glib_idle_callback (void *)
 

Private Attributes

struct lws_protocol_vhost_options _lws_vhost_opt
 
struct lws_protocols _lws_proto [2]
 
struct lws_http_mount _lws_mnt_root
 
struct lws_http_mount _lws_mnt_user
 
struct lws_context_creation_info _lws_info
 
struct lws_context * _lws_context
 
ClientContextMap _client_ctx
 
ServerResources _resources
 
Glib::RefPtr< Glib::IOChannel > _channel
 
LwsPollFdGlibSourceMap _fd_ctx
 
bool _fd_callbacks
 
GSource * _g_source
 

Additional Inherited Members

- Protected Attributes inherited from ArdourSurface::SurfaceComponent
ArdourSurface::ArdourWebsockets_surface
 

Detailed Description

Definition at line 44 of file server.h.

Member Typedef Documentation

◆ ClientContextMap

Definition at line 66 of file server.h.

◆ LwsPollFdGlibSourceMap

typedef boost::unordered_map<lws_sockfd_type, LwsPollFdGlibSource> ArdourSurface::WebsocketsServer::LwsPollFdGlibSourceMap
private

Definition at line 93 of file server.h.

Constructor & Destructor Documentation

◆ WebsocketsServer()

ArdourSurface::WebsocketsServer::WebsocketsServer ( ArdourSurface::ArdourWebsockets )

◆ ~WebsocketsServer()

virtual ArdourSurface::WebsocketsServer::~WebsocketsServer ( )
inlinevirtual

Definition at line 48 of file server.h.

Member Function Documentation

◆ add_client()

int ArdourSurface::WebsocketsServer::add_client ( Client  )
private

◆ add_poll_fd()

int ArdourSurface::WebsocketsServer::add_poll_fd ( struct lws_pollargs *  )
private

◆ del_client()

int ArdourSurface::WebsocketsServer::del_client ( Client  )
private

◆ del_poll_fd()

int ArdourSurface::WebsocketsServer::del_poll_fd ( struct lws_pollargs *  )
private

◆ events_to_ioc()

Glib::IOCondition ArdourSurface::WebsocketsServer::events_to_ioc ( int  )
private

◆ fd_callbacks()

bool ArdourSurface::WebsocketsServer::fd_callbacks ( )
inlineprivate

Definition at line 98 of file server.h.

◆ glib_idle_callback()

static gboolean ArdourSurface::WebsocketsServer::glib_idle_callback ( void *  )
staticprivate

◆ io_handler()

bool ArdourSurface::WebsocketsServer::io_handler ( Glib::IOCondition  ,
lws_sockfd_type   
)
private

◆ ioc_to_events()

int ArdourSurface::WebsocketsServer::ioc_to_events ( Glib::IOCondition  )
private

◆ lws_callback()

static int ArdourSurface::WebsocketsServer::lws_callback ( struct lws *  ,
enum  lws_callback_reasons,
void *  ,
void *  ,
size_t   
)
staticprivate

◆ mod_poll_fd()

int ArdourSurface::WebsocketsServer::mod_poll_fd ( struct lws_pollargs *  )
private

◆ read_blocks_event_loop()

bool ArdourSurface::WebsocketsServer::read_blocks_event_loop ( )
inline

Definition at line 120 of file server.h.

◆ recv_client()

int ArdourSurface::WebsocketsServer::recv_client ( Client  ,
void *  ,
size_t   
)
private

◆ request_write()

void ArdourSurface::WebsocketsServer::request_write ( Client  )
private

◆ send_availsurf_body()

int ArdourSurface::WebsocketsServer::send_availsurf_body ( Client  )
private

◆ send_availsurf_hdr()

int ArdourSurface::WebsocketsServer::send_availsurf_hdr ( Client  )
private

◆ start()

int ArdourSurface::WebsocketsServer::start ( )
virtual

Reimplemented from ArdourSurface::SurfaceComponent.

◆ stop()

int ArdourSurface::WebsocketsServer::stop ( )
virtual

Reimplemented from ArdourSurface::SurfaceComponent.

◆ update_all_clients()

void ArdourSurface::WebsocketsServer::update_all_clients ( const NodeState ,
bool   
)

◆ update_client()

void ArdourSurface::WebsocketsServer::update_client ( Client  ,
const NodeState ,
bool   
)

◆ write_client()

int ArdourSurface::WebsocketsServer::write_client ( Client  )
private

Member Data Documentation

◆ _channel

Glib::RefPtr<Glib::IOChannel> ArdourSurface::WebsocketsServer::_channel
private

Definition at line 91 of file server.h.

◆ _client_ctx

ClientContextMap ArdourSurface::WebsocketsServer::_client_ctx
private

Definition at line 67 of file server.h.

◆ _fd_callbacks

bool ArdourSurface::WebsocketsServer::_fd_callbacks
private

Definition at line 96 of file server.h.

◆ _fd_ctx

LwsPollFdGlibSourceMap ArdourSurface::WebsocketsServer::_fd_ctx
private

Definition at line 94 of file server.h.

◆ _g_source

GSource* ArdourSurface::WebsocketsServer::_g_source
private

Definition at line 115 of file server.h.

◆ _lws_context

struct lws_context* ArdourSurface::WebsocketsServer::_lws_context
private

Definition at line 64 of file server.h.

◆ _lws_info

struct lws_context_creation_info ArdourSurface::WebsocketsServer::_lws_info
private

Definition at line 54 of file server.h.

◆ _lws_mnt_root

struct lws_http_mount ArdourSurface::WebsocketsServer::_lws_mnt_root
private

Definition at line 54 of file server.h.

◆ _lws_mnt_user

struct lws_http_mount ArdourSurface::WebsocketsServer::_lws_mnt_user
private

Definition at line 54 of file server.h.

◆ _lws_proto

struct lws_protocols ArdourSurface::WebsocketsServer::_lws_proto[2]
private

Definition at line 54 of file server.h.

◆ _lws_vhost_opt

struct lws_protocol_vhost_options ArdourSurface::WebsocketsServer::_lws_vhost_opt
private

Definition at line 54 of file server.h.

◆ _resources

ServerResources ArdourSurface::WebsocketsServer::_resources
private

Definition at line 69 of file server.h.


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