TransferSocket.h
上传用户:jessejm
上传日期:2022-06-04
资源大小:1914k
文件大小:2k
源码类别:

P2P编程

开发平台:

Visual C++

  1. #if !defined(AFX_TRANSFERSOCKET_H__B3710126_6EF0_4A33_87F5_680BB011F089__INCLUDED_)
  2. #define AFX_TRANSFERSOCKET_H__B3710126_6EF0_4A33_87F5_680BB011F089__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // TransferSocket.h : header file
  7. //
  8. #include "afxsock.h"
  9. #include "CMessg.h"
  10. class CTransferDlg;
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CTransferSocket command target
  13. class CTransferSocket : public CSocket
  14. {
  15. // Attributes
  16. public:
  17. CArchive* m_aSessionIn;
  18. CArchive* m_aSessionOut;
  19. CSocketFile* m_sfSocketFile;
  20. CTransferDlg * m_dlg;
  21. bool m_bInit;
  22. bool m_bClose;
  23. CFile m_file;
  24. public:
  25. void Init(CTransferDlg * dlg);
  26. BOOL SendMessage(CMessg * msg);
  27. void CloseSocket();
  28. // Operations
  29. public:
  30. CTransferSocket();
  31. virtual ~CTransferSocket();
  32. // Overrides
  33. public:
  34. // ClassWizard generated virtual function overrides
  35. //{{AFX_VIRTUAL(CTransferSocket)
  36. public:
  37. virtual void OnReceive(int nErrorCode);
  38. virtual void OnClose(int nErrorCode);
  39. //}}AFX_VIRTUAL
  40. // Generated message map functions
  41. //{{AFX_MSG(CTransferSocket)
  42. // NOTE - the ClassWizard will add and remove member functions here.
  43. //}}AFX_MSG
  44. // Implementation
  45. protected:
  46. };
  47. /////////////////////////////////////////////////////////////////////////////
  48. //{{AFX_INSERT_LOCATION}}
  49. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  50. #endif // !defined(AFX_TRANSFERSOCKET_H__B3710126_6EF0_4A33_87F5_680BB011F089__INCLUDED_)