You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef SG_IO_SOCKET_HXX
*/
class IPAddress
{
- struct sockaddr_in* addr;
+ mutable struct sockaddr_in* addr;
public:
IPAddress () : addr(0) {}
IPAddress ( const char* host, int port ) ;
~IPAddress();
+ static bool lookupNonblocking(const char* host, IPAddress& addr);
+
IPAddress( const IPAddress& other );
const IPAddress& operator=(const IPAddress& other);
+ bool isValid () const;
void set ( const char* host, int port ) ;
const char* getHost () const ;
unsigned int getPort() const ;
+ void setPort(int port);
+
unsigned int getIP () const ;
unsigned int getFamily () const ;
static const char* getLocalHost () ;
class Socket
{
int handle ;
-
+
public:
Socket () ;