close Warning: Can't use blame annotator:
svn blame failed on trunk/lib/FlairCore/src/unexported/ui_com.h: 200029 - Couldn't perform atomic initialization

source: flair-src/trunk/lib/FlairCore/src/unexported/ui_com.h@ 234

Last change on this file since 234 was 234, checked in by Sanahuja Guillaume, 6 years ago

create file oscket only when necessary

File size: 1.8 KB
RevLine 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5// created: 2011/05/01
6// filename: ui_com.h
7//
8// author: Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: classe permettant la lecture et l'ecriture RT sur socket UDT
14//
15//
16/*********************************************************************/
17
18#ifndef UI_COM_H
19#define UI_COM_H
20
21#include "Thread.h"
22#include <udt.h>
23#ifdef __XENO__
24#include <native/pipe.h>
25#endif
26
27namespace flair {
28namespace core {
29class Mutex;
30class Object;
31}
32namespace gui {
33class SendData;
34}
35}
36
37class ui_com : public flair::core::Thread {
38public:
39 ui_com(const flair::core::Object *parent, UDTSOCKET sock);
40 ~ui_com();
41 void Send(char *buf, ssize_t size);
42 ssize_t Receive(char *buf, ssize_t buf_size);
43 void AddSendData(const flair::gui::SendData *obj);
44 void UpdateSendData(const flair::gui::SendData *obj);
45 void RemoveSendData(const flair::gui::SendData *obj);
46 void UpdateDataToSendSize(void);
47 void Block(void);
48 void UnBlock(void);
49 bool ConnectionLost(void);
50 void CheckConnection(void);
51private:
52 ssize_t send_size;
53 char *send_buffer;
54 std::vector<const flair::gui::SendData *> data_to_send;
55 std::vector<flair::core::Time> resume_time;
56 flair::core::Mutex *send_mutex;
57 UDTSOCKET socket_fd;
58 bool connection_lost;
59 void Run(void);
60 void SendDatas(void);
61 static int compressBuffer(char *in, ssize_t in_size, char **out,
62 ssize_t *out_size, int level);
63 static int uncompressBuffer(unsigned char *in, ssize_t in_size,
64 unsigned char **out, ssize_t *out_size);
65#ifdef __XENO__
66 bool is_running;
67 static void *user_thread(void *arg);
68 pthread_t thread;
69 RT_PIPE pipe;
70#endif
71};
72
73#endif // UI_COM_H
Note: See TracBrowser for help on using the repository browser.