COVISE Core
Public Member Functions | Protected Member Functions | List of all members
covise::ServerConnection Class Reference

#include <covise_connect.h>

Inheritance diagram for covise::ServerConnection:
Inheritance graph
[legend]
Collaboration diagram for covise::ServerConnection:
Collaboration graph
[legend]

Public Member Functions

 ServerConnection (int p, int id, int st)
 
 ServerConnection (int *p, int id, int st)
 
 ServerConnection (Socket *s)
 
virtual ~ServerConnection ()
 
int acceptOne ()
 
int acceptOne (float timeout)
 
int listen ()
 
std::unique_ptr< ServerConnectionspawn_connection () const
 
std::unique_ptr< SimpleServerConnectionspawnSimpleConnection () const
 
- Public Member Functions inherited from covise::Connection
 Connection ()
 
 Connection (int sfd)
 
virtual ~Connection ()
 
SocketgetSocket () const
 
void set_peer (int id, int type)
 
int get_peer_id () const
 
int get_peer_type () const
 
int is_connected () const
 
virtual int receive (void *buf, unsigned nbyte) const
 
virtual int send (const void *buf, unsigned nbyte) const
 
virtual int recv_msg (Message *msg, char *ip=nullptr) const
 
virtual int recv_msg_fast (Message *msg) const
 
virtual bool sendMessage (const Message *msg) const override
 
virtual bool sendMessage (const UdpMessage *msg) const override
 
virtual int send_msg_fast (const Message *msg)
 
int check_for_input (float time=0.0) const
 
int get_port () const
 
void set_hostid (int id)
 
int get_hostid () const
 
int get_sendertype () const
 
int get_id (void(*remove_func)(int)) const
 
int get_sender_id () const
 
void close ()
 
void close_inform ()
 
int has_message () const
 
void print () const
 
Hostget_host ()
 
const Hostget_host () const
 
const char * get_hostname () const
 
- Public Member Functions inherited from covise::MessageSenderInterface
 MessageSenderInterface ()=default
 
virtual ~MessageSenderInterface ()=default
 
bool send (const covise::MessageBase *msg) const
 
bool send (const covise::Message *msg) const
 
bool send (const UdpMessage *msg) const
 
bool send (covise::TokenBuffer &tb, int type, Protocol p=Protocol::TCP) const
 

Protected Member Functions

void get_dataformat ()
 
- Protected Member Functions inherited from covise::Connection
int get_id () const
 
bool sendMessage (int senderId, int senderType, const Message *msg) const
 
virtual bool sendMessage (const covise::Message *msg) const =0
 
virtual bool sendMessage (const UdpMessage *msg) const =0
 

Additional Inherited Members

- Public Attributes inherited from covise::Connection
char convert_to
 
- Protected Attributes inherited from covise::Connection
class Socketsock = nullptr
 
int port
 
int sender_id
 
int send_type
 
int peer_id_
 
int peer_type_
 
int message_to_do
 
int bytes_to_process
 
unsigned long tru
 
char * read_buf = nullptr
 
Hostother_host = nullptr
 
int hostid
 
void(* remove_socket )(int)
 
int * header_int
 

Constructor & Destructor Documentation

◆ ServerConnection() [1/3]

ServerConnection::ServerConnection ( int  p,
int  id,
int  st 
)

◆ ServerConnection() [2/3]

ServerConnection::ServerConnection ( int *  p,
int  id,
int  st 
)

◆ ServerConnection() [3/3]

covise::ServerConnection::ServerConnection ( Socket s)
inline

◆ ~ServerConnection()

virtual covise::ServerConnection::~ServerConnection ( )
inlinevirtual

Member Function Documentation

◆ acceptOne() [1/2]

int ServerConnection::acceptOne ( )

◆ acceptOne() [2/2]

int ServerConnection::acceptOne ( float  timeout)

◆ get_dataformat()

void ServerConnection::get_dataformat ( )
protected

◆ listen()

int ServerConnection::listen ( )

◆ spawn_connection()

std::unique_ptr< ServerConnection > ServerConnection::spawn_connection ( ) const

◆ spawnSimpleConnection()

std::unique_ptr< SimpleServerConnection > ServerConnection::spawnSimpleConnection ( ) const

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