ReceiveData.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.InteropServices;
  5. using System.Text;
  6. namespace HPSocketCS.Extended
  7. {
  8. /// <summary>
  9. /// 接收数据处理对象
  10. /// </summary>
  11. public class ReceiveData
  12. {
  13. public ReceiveData()
  14. {
  15. }
  16. TcpHeadInfo _ReceiveRemoteClientInfo;
  17. /// <summary>
  18. /// 收到到的远程客户端信息结构
  19. /// </summary>
  20. public TcpHeadInfo ReceiveRemoteClientInfo
  21. {
  22. get { return _ReceiveRemoteClientInfo; }
  23. set { _ReceiveRemoteClientInfo = value; }
  24. }
  25. System.IO.MemoryStream _ReceiveDataMstream = null;
  26. /// <summary>
  27. /// 收接到的数据内存流
  28. /// </summary>
  29. public System.IO.MemoryStream ReceiveDataMstream
  30. {
  31. get {
  32. if (_ReceiveDataMstream == null)
  33. {
  34. _ReceiveDataMstream = new System.IO.MemoryStream();
  35. }
  36. return _ReceiveDataMstream; }
  37. set { _ReceiveDataMstream = value; }
  38. }
  39. public void Dispose()
  40. {
  41. this._ReceiveDataMstream.Close();
  42. this._ReceiveDataMstream.Dispose();
  43. this._ReceiveDataMstream = null;
  44. }
  45. }
  46. }