"Fossies" - the Fresh Open Source Software Archive

Member "postal-0.76/address.h" (19 Nov 2000, 503 Bytes) of package /linux/privat/postal-0.76.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "address.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef ADDRESS_H
    2 #define ADDRESS_H
    3 
    4 #include <sys/types.h>
    5 #include <netinet/in.h>
    6 struct sockaddr;
    7 
    8 class address
    9 {
   10 public:
   11   address(const char *addr, unsigned short default_port = 0);
   12   ~address();
   13   sockaddr *get_addr(int ind);
   14   sockaddr *get_rand_addr();
   15   int addressCount() const { return m_count; }
   16 
   17 private:
   18   int resolve_name(int ind);
   19   sockaddr_in *m_addr;
   20   char **m_hostname;
   21   bool *m_rr_dns;
   22   int m_count;
   23 
   24   address(const address&);
   25   address & operator=(const address&);
   26 };
   27 
   28 #endif