SSLHttpSdk.cs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.InteropServices;
  5. using System.Text;
  6. namespace HPSocketCS
  7. {
  8. public class SSLHttpSdk
  9. {
  10. /// <summary>
  11. /// 创建 HP_HttpsServer 对象
  12. /// </summary>
  13. /// <param name="pListener"></param>
  14. /// <returns></returns>
  15. [DllImport(Sdk.HPSOCKET_DLL_PATH, CharSet = CharSet.Ansi, SetLastError = true)]
  16. public static extern IntPtr Create_HP_HttpsServer(IntPtr pListener);
  17. /// <summary>
  18. /// 创建 HP_HttpsAgent 对象
  19. /// </summary>
  20. /// <param name="pListener"></param>
  21. /// <returns></returns>
  22. [DllImport(Sdk.HPSOCKET_DLL_PATH, CharSet = CharSet.Ansi, SetLastError = true)]
  23. public static extern IntPtr Create_HP_HttpsAgent(IntPtr pListener);
  24. /// <summary>
  25. /// 创建 HP_HttpsClient 对象
  26. /// </summary>
  27. /// <param name="pListener"></param>
  28. /// <returns></returns>
  29. [DllImport(Sdk.HPSOCKET_DLL_PATH, CharSet = CharSet.Ansi, SetLastError = true)]
  30. public static extern IntPtr Create_HP_HttpsClient(IntPtr pListener);
  31. /// <summary>
  32. /// 创建 HP_HttpsSyncClient 对象
  33. /// </summary>
  34. /// <param name="pListener"></param>
  35. /// <returns></returns>
  36. [DllImport(Sdk.HPSOCKET_DLL_PATH, CharSet = CharSet.Ansi, SetLastError = true)]
  37. public static extern IntPtr Create_HP_HttpsSyncClient(IntPtr pListener);
  38. /// <summary>
  39. /// 销毁 HP_HttpsServer 对象
  40. /// </summary>
  41. /// <param name="pServer"></param>
  42. [DllImport(Sdk.HPSOCKET_DLL_PATH, CharSet = CharSet.Ansi, SetLastError = true)]
  43. public static extern void Destroy_HP_HttpsServer(IntPtr pServer);
  44. /// <summary>
  45. /// 销毁 HP_HttpsAgent 对象
  46. /// </summary>
  47. /// <param name="pAgent"></param>
  48. [DllImport(Sdk.HPSOCKET_DLL_PATH, CharSet = CharSet.Ansi, SetLastError = true)]
  49. public static extern void Destroy_HP_HttpsAgent(IntPtr pAgent);
  50. /// <summary>
  51. /// 销毁 HP_HttpsClient 对象
  52. /// </summary>
  53. /// <param name="pClient"></param>
  54. [DllImport(Sdk.HPSOCKET_DLL_PATH, CharSet = CharSet.Ansi, SetLastError = true)]
  55. public static extern void Destroy_HP_HttpsClient(IntPtr pClient);
  56. /// <summary>
  57. /// 销毁 HP_HttpsSyncClient 对象
  58. /// </summary>
  59. /// <param name="pClient"></param>
  60. [DllImport(Sdk.HPSOCKET_DLL_PATH, CharSet = CharSet.Ansi, SetLastError = true)]
  61. public static extern void Destroy_HP_HttpsSyncClient(IntPtr pClient);
  62. }
  63. }