Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
Server Class Reference

Deskflow server. More...

#include <Server.h>

Inheritance diagram for Server:
Collaboration diagram for Server:

Classes

class  KeyboardBroadcastInfo
 Keyboard broadcast data. More...
class  LockCursorToScreenInfo
 Lock cursor to screen data. More...
class  ScreenConnectedInfo
 Screen connected data. More...
class  SwitchInDirectionInfo
 Switch in direction data. More...
class  SwitchToScreenInfo
 Switch to screen data. More...

Public Member Functions

 Server (ServerConfig &config, PrimaryClient *primaryClient, deskflow::Screen *screen, IEventQueue *events, deskflow::ServerArgs const &args)
 Server (Server const &)=delete
 Server (Server &&)=delete
 ~Server () override
Serveroperator= (Server const &)=delete
Serveroperator= (Server &&)=delete
manipulators
bool setConfig (const ServerConfig &)
 Set configuration.
void adoptClient (BaseClientProxy *client)
 Add a client.
void disconnect ()
 Disconnect clients.
void setListener (ClientListener *p)
 Store ClientListener pointer.

accessors

std::string protocolString () const
 Get the network protocol.
uint32_t getNumClients () const
 Get number of connected clients.
void getClients (std::vector< std::string > &list) const
 Get the list of connected clients.

Detailed Description

Deskflow server.

This class implements the top-level server algorithms for deskflow.

Constructor & Destructor Documentation

◆ Server() [1/3]

Server::Server ( ServerConfig & config,
PrimaryClient * primaryClient,
deskflow::Screen * screen,
IEventQueue * events,
deskflow::ServerArgs const & args )

Start the server with the configuration config and the primary client (local screen) primaryClient. The client retains ownership of primaryClient.

◆ Server() [2/3]

Server::Server ( Server const & )
delete

◆ Server() [3/3]

Server::Server ( Server && )
delete

◆ ~Server()

Server::~Server ( )
override

Member Function Documentation

◆ adoptClient()

void Server::adoptClient ( BaseClientProxy * client)

Add a client.

Adds client to the server. The client is adopted and will be destroyed when the client disconnects or is disconnected.

◆ disconnect()

void Server::disconnect ( )

Disconnect clients.

Disconnect clients. This tells them to disconnect but does not wait for them to actually do so. The server sends the disconnected event when they're all disconnected (or immediately if none are connected). The caller can also just destroy this object to force the disconnection.

◆ getClients()

void Server::getClients ( std::vector< std::string > & list) const

Get the list of connected clients.

Set the list to the names of the currently connected clients.

◆ getNumClients()

uint32_t Server::getNumClients ( ) const

Get number of connected clients.

Returns the number of connected clients, including the server itself.

◆ operator=() [1/2]

Server & Server::operator= ( Server && )
delete

◆ operator=() [2/2]

Server & Server::operator= ( Server const & )
delete

◆ protocolString()

std::string Server::protocolString ( ) const

Get the network protocol.

Returns the network protocol used by the server.

◆ setConfig()

bool Server::setConfig ( const ServerConfig & config)

Set configuration.

Change the server's configuration. Returns true iff the new configuration was accepted (it must include the server's name). This will disconnect any clients no longer in the configuration.

◆ setListener()

void Server::setListener ( ClientListener * p)
inline

Store ClientListener pointer.


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