Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9306 in orxonox.OLD for branches/proxy/src/lib/network/ip.h


Ignore:
Timestamp:
Jul 17, 2006, 2:21:42 PM (19 years ago)
Author:
bensch
Message:

orxonox/proxy: ip class ok now

File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/ip.h

    r9305 r9306  
    22/*!
    33 * @file ip.h
    4  * @brief Definition of Time Class.
    54 *
    6  * These are mainly Classes, that are used for wrapping around SDL_thread
     5 * @brief the ip class is used to transform strings to ip's and backwards
     6 * it can also be used to
     7 *
    78 */
    89
     
    2122    IP();
    2223    IP(const std::string& ip);
    23     IP(int ip);
     24    IP(int ip, int port);
     25    IP(const IPaddress& ip);
     26    IP(const IP& ip);
     27
     28    const IP& operator=(const IP& ip);
     29    bool operator==(const IP& ip);
    2430
    2531
     
    2733    short port() const { return this->_port; };
    2834
    29     int ip(unsigned int part) const;
    30     std::string& ipString() const;
     35    int ipPart(unsigned int part) const;
     36    std::string ipString() const;
    3137
    3238
    3339
    3440  public:
    35     static int stringToIP(const std::string& ip);
     41    static IP stringToIP(const std::string& ip);
     42
     43
    3644    static std::string ipToString(const IPaddress& ipaddr);
    3745    static std::string ipToString(int ip);
    3846
    3947  private:
    40     int           _ip;  //!< the IP in int form.
    41     short         _port;
     48    int           _ip;    //!< The IP in int form.
     49    short         _port;  //!< The Port number of the IP
    4250
    4351};
Note: See TracChangeset for help on using the changeset viewer.