//  Beta release only.
//
//  Copyright(c) Ivyware Pty Ltd 2002-9  (all rights reserved)
//               MELBOURNE, VICTORIA, AUSTRALIA, 3130
//
//  Provided no fee is charged (either by the distributer or user)
//  permission to use, copy, modify, and distribute this software and
//  its documentation for any purpose and without fee is hereby granted,
//  provided that the above copyright notice appear in all copies and
//  that both that copyright notice and this permission notice appear
//  in supporting documentation.
//
//  No waranty or suitablity for purpose is implied.
//
//
//  Definitions for the Microsoft Ws2_32.dll library extensions
//
#pragma once
#include "P2PmsgKERNEL.h"

//
//  Safe SOCKET container
//  NOTES: SOCKET is managed within the life cycle of this object.
//
#ifndef SOCKET
#define SOCKET UINT_PTR
#endif
class SafeSOCKET
{
    public:
        SafeSOCKET ( );
        SafeSOCKET ( SOCKET oSocket );
       ~SafeSOCKET ( );

      SafeSOCKET&
        operator = ( SOCKET oSocket );
        operator SOCKET ( );
 
      SOCKET
        Dereference();

    private:
        SOCKET m_oSocket;
};

//
//  WS extensions
P2PmsgKERNEL_EXT CString
WSA_GetHostName ( );
