BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
70b8935
Branches
Tags
master
Blinker
src
linux
Udp4Addr.h
implemented UDPv4 socket class
Stefan Schuermans
commited
70b8935
at 2011-11-12 22:47:21
Udp4Addr.h
Blame
History
Raw
/* Blinker Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef UDP4ADDR_H #define UDP4ADDR_H #include <netinet/in.h> #include <string> #include <sys/socket.h> #include <sys/types.h> #include "Addr.h" namespace Blinker { /// UDP v4 address class Udp4Addr: public Addr { public: /// constructor Udp4Addr(); /// virtual destructor virtual ~Udp4Addr(); public: /// return address family virtual int getFamily() const; /** * @brief parse from string format * @param[in] str string format * @return if parsing was successful */ virtual bool fromStr(const std::string &str); /** * @brief convert to string format * @return string format */ virtual std::string toStr() const; protected: struct sockaddr_in m_addr; friend class Udp4Sock; }; // class Udp4Addr } // namespace Blinker #endif // #ifndef UDP4ADDR_H