Changeset 15 in flair-src for trunk/lib/FlairCore/src/UdtSocket.h


Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (5 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/UdtSocket.h

    r2 r15  
    1818#include <ConnectedSocket.h>
    1919
    20 namespace flair
    21 {
    22 namespace core
    23 {
    24     /*! \class UdtSocket
    25     *
    26     * \brief Class encapsulating a UDT socket
    27     *
    28     */
    29     class UdtSocket:public ConnectedSocket {
    30     public:
    31         UdtSocket(const Object* parent,const std::string name,bool blockOnSend=false,bool blockOnReceive=true);
    32         ~UdtSocket();
    33         void Listen(const unsigned int port,const std::string localAddress="ANY");
    34         UdtSocket *Accept(Time timeout); //should throw an exception if not a listening socket
    35         bool Connect(const unsigned int port,const std::string distantAddress,Time timeout); // /!\ timeout is ignored
    36         ssize_t SendMessage(const char* message,size_t message_len,Time timeout);
    37         ssize_t RecvMessage(char* buf,size_t buf_len,Time timeout);
     20namespace flair {
     21namespace core {
     22/*! \class UdtSocket
     23*
     24* \brief Class encapsulating a UDT socket
     25*
     26*/
     27class UdtSocket : public ConnectedSocket {
     28public:
     29  UdtSocket(const Object *parent, const std::string name,
     30            bool blockOnSend = false, bool blockOnReceive = true);
     31  ~UdtSocket();
     32  void Listen(const unsigned int port, const std::string localAddress = "ANY");
     33  UdtSocket *
     34  Accept(Time timeout); // should throw an exception if not a listening socket
     35  bool Connect(const unsigned int port, const std::string distantAddress,
     36               Time timeout); // /!\ timeout is ignored
     37  ssize_t SendMessage(const char *message, size_t message_len, Time timeout);
     38  ssize_t RecvMessage(char *buf, size_t buf_len, Time timeout);
    3839
    39         uint16_t NetworkToHost16(uint16_t data);
    40         uint16_t HostToNetwork16(uint16_t data);
    41         uint32_t NetworkToHost32(uint32_t data);
    42         uint32_t HostToNetwork32(uint32_t data);
     40  uint16_t NetworkToHost16(uint16_t data);
     41  uint16_t HostToNetwork16(uint16_t data);
     42  uint32_t NetworkToHost32(uint32_t data);
     43  uint32_t HostToNetwork32(uint32_t data);
    4344
    44     private:
    45         UDTSOCKET socket;
    46         bool blockOnSend;
    47         bool blockOnReceive;
    48     };
     45private:
     46  UDTSOCKET socket;
     47  bool blockOnSend;
     48  bool blockOnReceive;
     49};
    4950
    5051} // end namespace core
Note: See TracChangeset for help on using the changeset viewer.