8 #ifndef EC_CONNECTION_H
9 #define EC_CONNECTION_H
18 #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);
331 Connection *check_for_input(
float time = 0.0);
343 typedef int(PasswordCallback)(
char *
buf,
int size,
int rwflag,
void *userdata);
346 SSLConnection(
int sfd);
355 int AttachSSLToSocket(Socket *sock);
357 int receive(
void *
buf,
unsigned nbyte);
358 int send(
const void *
buf,
unsigned nbyte);
359 int recv_msg(Message *msg);
360 int send_msg(
const Message *msg);
361 const char *readLine();
362 int get_id(
void (*remove_func)(
int));
369 struct sockaddr_in mSA_client;
370 struct sockaddr_in mSA_server;
379 void setPasswdCallback(PasswordCallback *,
void *userData);
380 void validateConnState();
382 PasswordCallback *mSSLCB;
388 class NETEXPORT SSLServerConnection :
public SSLConnection
391 SSLServerConnection(PasswordCallback *cb,
void *userData);
392 SSLServerConnection(
int *
p,
int id,
int s_type, PasswordCallback *cb,
void *userData);
393 SSLServerConnection(
int p,
int id,
int st, PasswordCallback *cb,
void *userData);
394 SSLServerConnection(SSLSocket *socket, PasswordCallback *cb,
void *userData);
395 ~SSLServerConnection();
404 SSLServerConnection *spawnConnection();
410 class NETEXPORT SSLClientConnection :
public SSLConnection
413 SSLClientConnection(Host *,
int p, PasswordCallback *cb,
void *userData );
414 ~SSLClientConnection();
424 void getErrorMessage(
long result);
size_t buflen
Definition: covise_connect.h:259
Host * lhost
Definition: covise_connect.h:257
GLsizeiptr size
Definition: khronos-glext.h:6610
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: khronos-glext.h:8469
ServerConnection(Socket *s)
Definition: covise_connect.h:210
int get_port()
Definition: covise_connect.h:163
Definition: covise_connect.h:115
GLuint address
Definition: khronos-glext.h:10368
GLsizei const GLchar *const * string
Definition: khronos-glext.h:6750
struct ssl_ctx_st SSL_CTX
Definition: covise_connect.h:26
int get_hostid()
Definition: covise_connect.h:168
GLuint GLuint GLsizei count
Definition: khronos-glext.h:6343
unsigned long tru
Definition: covise_connect.h:128
int get_sendertype()
Definition: covise_connect.h:172
GLuint buffer
Definition: khronos-glext.h:6606
GLfloat GLfloat GLfloat GLfloat h
Definition: khronos-glext.h:8441
const GLubyte * c
Definition: khronos-glext.h:9864
Definition: covise_host.h:18
const int EC_CLIENT
Definition: covise_connect.h:62
int sender_id
Definition: covise_connect.h:122
GLfloat GLfloat p
Definition: khronos-glext.h:9861
GLbitfield GLuint64 timeout
Definition: khronos-glext.h:7882
int hostid
Definition: covise_connect.h:131
virtual ~ServerConnection()
Definition: covise_connect.h:214
ServerConnection * open_sock
Definition: covise_connect.h:318
int bytes_to_process
Definition: covise_connect.h:127
int has_message()
Definition: covise_connect.h:183
char * read_buf
Definition: covise_connect.h:129
int send_type
Definition: covise_connect.h:123
int peer_type_
Definition: covise_connect.h:125
Definition: covise_socket.h:125
int maxfd
Definition: covise_connect.h:317
int port
Definition: covise_connect.h:121
std::vector< Connection * > connlist
Definition: covise_connect.h:315
Definition: covise_connect.h:200
struct ssl_st SSL
Definition: covise_connect.h:25
size_t buflen
Definition: covise_connect.h:229
GLboolean reset
Definition: khronos-glext.h:6369
DataManagerConnection(int pp, int my_id, int st)
Definition: covise_connect.h:281
Definition: covise_connect.h:254
GLuint64EXT * result
Definition: khronos-glext.h:12573
Host * lhost
Definition: covise_connect.h:244
Definition: covise_connect.h:241
ControllerConnection(Host *h, int p, int id, int st)
Definition: covise_connect.h:293
class Socket * sock
Definition: covise_connect.h:120
~DataManagerConnection()
Definition: covise_connect.h:285
Socket * getSocket()
Definition: covise_connect.h:142
GLdouble s
Definition: khronos-glext.h:6441
~ControllerConnection()
Definition: covise_connect.h:296
int message_to_do
Definition: covise_connect.h:126
char convert_to
Definition: covise_connect.h:137
int get_sender_id()
Definition: covise_connect.h:177
int peer_id_
Definition: covise_connect.h:124
#define NETEXPORT
Definition: coExport.h:361
Host * other_host
Definition: covise_connect.h:130
Definition: covise_connect.h:289
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
Definition: covise_connect.h:269
void print()
Definition: covise_connect.h:191
Definition: covise_connect.h:299
GLenum type
Definition: khronos-glext.h:6279
Definition: covise_connect.h:312
int is_connected()
Definition: covise_connect.h:150
Host * host
Definition: covise_connect.h:256
fd_set fdvar
Definition: covise_connect.h:316
struct ssl_method_st SSL_METHOD
Definition: covise_connect.h:27
const int EC_SERVER
Definition: covise_connect.h:61
#define NULL
Definition: covise_list.h:22
Host * host
Definition: covise_connect.h:243
int * header_int
Definition: covise_connect.h:134
Definition: message.h:111
Definition: covise_connect.h:225
DataManagerConnection(Host *hp, int pp, int my_id, int st)
Definition: covise_connect.h:274