Changeset 74 in flair-dev for trunk/include/FlairCore
- Timestamp:
- May 24, 2018, 11:46:38 AM (7 years ago)
- Location:
- trunk/include/FlairCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairCore/ConnectedSocket.h
r25 r74 53 53 * \brief Returns a socket on a new incoming connexion 54 54 * 55 * \param ConnectedSocket &listeningSocket55 * \param timeout timeout (in nanoseconds) 56 56 */ 57 57 virtual ConnectedSocket *Accept( … … 65 65 * \param unsigned int port 66 66 * \param const distantAddress 67 * \param timeout timeout (in milliseconds)67 * \param timeout timeout (in nanoseconds) 68 68 */ 69 69 virtual bool Connect(const unsigned int port, … … 71 71 72 72 /*! 73 * \brief Send a message 73 * \brief Send a message waiting up to timeout ns 74 74 * 75 75 * \param message message 76 76 * \param message_len message length 77 * \param timeout timeout (in milliseconds)77 * \param timeout timeout (in nanoseconds) 78 78 */ 79 79 virtual ssize_t SendMessage(const char *message, size_t message_len, … … 83 83 * \brief Receive a message 84 84 * 85 * Receive a message and wait up to timeout . \n85 * Receive a message and wait up to timeout ns. \n 86 86 * 87 87 * \param buf buffer to put the message 88 88 * \param buf_len buffer length 89 * \param timeout timeout (in milliseconds)89 * \param timeout timeout (in nanoseconds) 90 90 * 91 91 * \return size of the received message -
trunk/include/FlairCore/IODevice.h
r50 r74 151 151 void SetIsReady(bool status); 152 152 153 private:154 153 /*! 155 154 * \brief Update using provided datas … … 164 163 virtual void UpdateFrom(const io_data *data) = 0; 165 164 165 private: 166 166 class IODevice_impl *pimpl_; 167 167 }; -
trunk/include/FlairCore/Semaphore.h
r62 r74 31 31 32 32 public: 33 enum class Type { anonymous, named }; 33 34 /*! 34 35 * \brief Constructor … … 39 40 * \param name name 40 41 */ 41 Semaphore(const Object *parent, uint32_t initialValue, std::string name = "" );42 Semaphore(const Object *parent, uint32_t initialValue, std::string name = "", Type type=Type::anonymous); 42 43 43 44 /*! … … 74 75 private: 75 76 class Semaphore_impl *pimpl_; 77 Type type; 76 78 }; 77 79 -
trunk/include/FlairCore/SharedMem.h
r62 r74 40 40 * \param parent parent 41 41 * \param name name 42 * \param size size of the shared memory 43 * \param blockOnRead if true reading will block if nothing written 42 * \param size size of the shared memory:w 43 * 44 * \param type mutex or producerConsumer. Mutex type is for symmetrical use (default) 44 45 */ 45 46 SharedMem(const Object *parent, std::string name, size_t size, Type type=Type::mutex); -
trunk/include/FlairCore/TcpSocket.h
r13 r74 30 30 void Listen(const unsigned int port, const std::string localAddress = "ANY"); 31 31 TcpSocket *Accept( 32 Time timeout = 0); // should throw an exception if not a listening socket32 Time timeout = TIME_INFINITE); 33 33 bool Connect(const unsigned int distantPort, const std::string distantAddress, 34 Time timeout = 0); // timeout in milliseconds 35 ssize_t SendMessage(const char *message, size_t message_len, 36 Time timeout = 0); // timeout in milliseconds 37 ssize_t RecvMessage(char *buf, size_t buf_len, 38 Time timeout = 0); // timeout in milliseconds 34 Time timeout = TIME_INFINITE); 35 ssize_t SendMessage(const char *message, size_t message_len, Time timeout = TIME_INFINITE); 36 ssize_t RecvMessage(char *buf, size_t buf_len, Time timeout = TIME_INFINITE); 39 37 40 38 uint16_t NetworkToHost16(uint16_t data); … … 48 46 bool blockOnReceive; 49 47 bool isConnected; 48 bool isListening; 50 49 unsigned int distantPort; 51 50 std::string distantAddress; 51 char *sendRingBuffer, *recvRingBuffer; 52 52 }; 53 53
Note:
See TracChangeset
for help on using the changeset viewer.