#if !defined(AFX_DppSocket_H__INCLUDED_) #define AFX_DppSocket_H__INCLUDED_ #pragma once #include "stdafx.h" //#include "NetFinder.h" #define WM_DPPSOCKET_RCV_BUFFER (WM_USER + 401) // DppSocket.h : header file typedef enum _SocketOwnerType { sockownNone, sockownMainDlg, sockownStartDlg } SocketOwnerType; ///////////////////////////////////////////////////////////////////////////// // CDppSocket command target class CDppSocket : public CSocket { // Attributes public: // Operations public: CDppSocket(); virtual ~CDppSocket(); // Overrides public: //BOOL CreateSocket(CDialog *pEvtDlg); BOOL CreateSocket(CWnd *pEvtDlg); void CloseSocket(); //void SetEventDlg(CDialog *pEvtDlg); void SetEventDlg(CWnd *pEvtDlg); void ResetEventDlg(); SocketOwnerType m_Owner; // who's talking now u_short DppPort; // dpp port for remote port (bsd type) u_long DppAddr; // dpp addr for remote addr (bsd type) // Receive helper vars int RcvCount; // byte count/offset for Packet buffer save int RcvTotal; // total bytes expected BOOL HaveHeader; // header found, get packet bytes BOOL IsSocketOpen(); bool SendPacketInet(unsigned char Buffer[], CDppSocket *DppSock); // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CDppSocket) public: virtual void OnReceive(int nErrorCode); //}}AFX_VIRTUAL // Generated message map functions //{{AFX_MSG(CDppSocket) // NOTE - the ClassWizard will add and remove member functions here. //}}AFX_MSG // Implementation protected: //CDialog *m_pEvtDlg; CWnd *m_pEvtDlg; BOOL m_SocketOpen; BOOL m_DataMode; }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_DppSocket_H__INCLUDED_)