//  Beta release only.
//
//  Copyright(c) Ivyware Pty Ltd 2005-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.
//
//
//  P2PeerioDmx definitions and prototypes
//  NOTES: Performs in-process P2PeerMsg image exchanges with direct
//         use of the IO Completion Port
//                      

#pragma once

#ifndef NO_DEBUG_NEW
#define new DEBUG_NEW
#endif

#include "P2Peerio.h"

//
//  P2PeerioDmx protocol management
//  NOTES: Performs in-process P2PeerMsg image exchange
class P2PmsgKERNEL_EXT P2PeerioDmx : public P2Peerio
{
      void
        RenderThisSafe();

    // Constructors and destructor
    public:
        P2PeerioDmx ( );
       ~P2PeerioDmx ( );

      virtual P2Peerio*
        Clone ( );

    // P2PeerMsg exchange
    protected:
      virtual DWORD
        SendP2PeerMsg ( HANDLE hFile
                      , P2PeerMsg *pMsg
                      , OVERLAPPEDcon *pOVERLAPPEDsend );
      virtual P2PeerMsg*
        RecvP2PeerMsg ( HANDLE hFile
                      , OVERLAPPEDcon *pOVERLAPPEDrecv );
    // Specialisation
    public:
      virtual void
        Reset ( );

    // Troubleshooting
    public:
      virtual void
        AssertValid ( ) const;

    // Attributes
    protected:
      OVERLAPPEDcon *m_pOVERLAPPEDrecv;
      OVERLAPPEDcon *m_pOVERLAPPEDsend;
};
