8 #ifndef EC_CONNECTION_H
9 #define EC_CONNECTION_H
17 #include <netinet/in.h>
25 typedef struct ssl_st
SSL;
68 class SimpleServerConnection;
72 #define WRITE_BUFFER_SIZE 393216
74 #define WRITE_BUFFER_SIZE 64000
76 #define READ_BUFFER_SIZE WRITE_BUFFER_SIZE
146 void set_peer(
int id,
int type);
154 return (get_id() != -1);
156 virtual int receive(
void *
buf,
unsigned nbyte);
157 virtual int send(
const void *
buf,
unsigned nbyte);
158 virtual int recv_msg(
Message *msg);
159 virtual int recv_msg_fast(
Message *msg);
160 virtual int send_msg(
const Message *msg);
161 virtual int send_msg_fast(
const Message *msg);
162 int check_for_input(
float time = 0.0);
167 void set_hostid(
int id);
176 int get_id(
void (*remove_func)(
int));
189 return message_to_do;
193 std::cerr <<
"port: " << port << std::endl;
196 const char *get_hostname();
203 void get_dataformat();
227 void get_dataformat();
237 const char *readLine();
265 const char *readLine();
266 void get_dataformat();
308 MulticastConnection(
int id,
int s_type,
int p,
char *MulticastGroup =
"224.10.10.10",
int ttl = 200);
328 return connlist->get_last();
333 Connection *check_for_input(
float time = 0.0);
341 return connlist->next();
348 class NETEXPORT SSLConnection :
public Connection
351 typedef int(PasswordCallback)(
char *
buf,
int size,
int rwflag,
void *userdata);
354 SSLConnection(
int sfd);
363 int AttachSSLToSocket(Socket *sock);
365 int receive(
void *
buf,
unsigned nbyte);
366 int send(
const void *
buf,
unsigned nbyte);
367 int recv_msg(Message *msg);
368 int send_msg(
const Message *msg);
369 const char *readLine();
370 int get_id(
void (*remove_func)(
int));
377 struct sockaddr_in mSA_client;
378 struct sockaddr_in mSA_server;
387 void setPasswdCallback(PasswordCallback *,
void *userData);
388 void validateConnState();
390 PasswordCallback *mSSLCB;
396 class NETEXPORT SSLServerConnection :
public SSLConnection
399 SSLServerConnection(PasswordCallback *cb,
void *userData);
400 SSLServerConnection(
int *
p,
int id,
int s_type, PasswordCallback *cb,
void *userData);
401 SSLServerConnection(
int p,
int id,
int st, PasswordCallback *cb,
void *userData);
402 SSLServerConnection(SSLSocket *socket, PasswordCallback *cb,
void *userData);
403 ~SSLServerConnection();
412 SSLServerConnection *spawnConnection();
418 class NETEXPORT SSLClientConnection :
public SSLConnection
421 SSLClientConnection(Host *,
int p, PasswordCallback *cb,
void *userData );
422 ~SSLClientConnection();
432 void getErrorMessage(
long result);
Definition: covise_host.h:17
int buflen
Definition: covise_connect.h:229
int get_port()
Definition: covise_connect.h:163
GLdouble s
Definition: khronos-glext.h:6441
Definition: covise_connect.h:115
int get_hostid()
Definition: covise_connect.h:168
unsigned long tru
Definition: covise_connect.h:128
int get_sendertype()
Definition: covise_connect.h:172
Definition: covise_connect.h:200
Definition: covise_connect.h:269
Connection * next()
Definition: covise_connect.h:339
struct ssl_method_st SSL_METHOD
Definition: covise_connect.h:27
#define NULL
Definition: covise_list.h:22
int sender_id
Definition: covise_connect.h:122
Definition: message.h:111
Definition: covise_socket.h:125
void reset()
Definition: covise_connect.h:335
int hostid
Definition: covise_connect.h:131
ServerConnection * open_sock
Definition: covise_connect.h:317
int bytes_to_process
Definition: covise_connect.h:127
List< Connection > * connlist
Definition: covise_connect.h:314
int has_message()
Definition: covise_connect.h:183
char * read_buf
Definition: covise_connect.h:129
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
int send_type
Definition: covise_connect.h:123
int peer_type_
Definition: covise_connect.h:125
int maxfd
Definition: covise_connect.h:316
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: khronos-glext.h:8469
Definition: covise_connect.h:299
int port
Definition: covise_connect.h:121
ServerConnection(Socket *s)
Definition: covise_connect.h:210
DataManagerConnection(int pp, int my_id, int st)
Definition: covise_connect.h:281
GLenum type
Definition: khronos-glext.h:6279
const int EC_SERVER
Definition: covise_connect.h:61
GLuint address
Definition: khronos-glext.h:10368
GLsizei const GLchar *const * string
Definition: khronos-glext.h:6750
~DataManagerConnection()
Definition: covise_connect.h:285
struct ssl_ctx_st SSL_CTX
Definition: covise_connect.h:26
GLuint GLuint GLsizei count
Definition: khronos-glext.h:6343
Connection * get_last()
Definition: covise_connect.h:326
Definition: covise_list.h:53
Host * lhost
Definition: covise_connect.h:244
#define NETEXPORT
Definition: coExport.h:343
Definition: covise_connect.h:241
ControllerConnection(Host *h, int p, int id, int st)
Definition: covise_connect.h:293
GLsizeiptr size
Definition: khronos-glext.h:6610
class Socket * sock
Definition: covise_connect.h:120
Socket * getSocket()
Definition: covise_connect.h:142
~ControllerConnection()
Definition: covise_connect.h:296
int message_to_do
Definition: covise_connect.h:126
char convert_to
Definition: covise_connect.h:137
const GLubyte * c
Definition: khronos-glext.h:9864
int get_sender_id()
Definition: covise_connect.h:177
int peer_id_
Definition: covise_connect.h:124
GLfloat GLfloat p
Definition: khronos-glext.h:9861
Host * host
Definition: covise_connect.h:256
Host * other_host
Definition: covise_connect.h:130
Definition: covise_connect.h:289
GLuint buffer
Definition: khronos-glext.h:6606
GLfloat GLfloat GLfloat GLfloat h
Definition: khronos-glext.h:8441
void print()
Definition: covise_connect.h:191
Host * lhost
Definition: covise_connect.h:257
Definition: covise_connect.h:312
int is_connected()
Definition: covise_connect.h:150
fd_set fdvar
Definition: covise_connect.h:315
DataManagerConnection(Host *hp, int pp, int my_id, int st)
Definition: covise_connect.h:274
struct ssl_st SSL
Definition: covise_connect.h:25
Definition: covise_connect.h:225
const int EC_CLIENT
Definition: covise_connect.h:62
Definition: covise_connect.h:254
GLbitfield GLuint64 timeout
Definition: khronos-glext.h:7882
Host * host
Definition: covise_connect.h:243
int buflen
Definition: covise_connect.h:259
virtual ~ServerConnection()
Definition: covise_connect.h:214
int * header_int
Definition: covise_connect.h:134
GLuint64EXT * result
Definition: khronos-glext.h:12573