00001 // 00002 // OS-specific networking facilities 00003 // 00004 #ifndef SST_NET_H 00005 #define SST_NET_H 00006 00007 class QHostAddress; 00008 00009 #ifdef WIN32 // htonl, ntohl 00010 #include <winsock2.h> 00011 #else 00012 #include <netinet/in.h> 00013 #endif 00014 00015 00016 namespace SST { 00017 00018 // Find the current user's name according to the operating system. 00019 QString userName(); 00020 00021 // Find all of the local host's IP addresses (OS specific) 00022 QList<QHostAddress> localHostAddrs(); 00023 00024 } // namespace SST 00025 00026 #endif // SST_NET_H