NatPunchthroughServer.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 2.0.1
  4. *
  5. * Do not make changes to this file unless you know what you are doing--modify
  6. * the SWIG interface file instead.
  7. * ----------------------------------------------------------------------------- */
  8. namespace RakNet {
  9. using System;
  10. using System.Runtime.InteropServices;
  11. public class NatPunchthroughServer : PluginInterface2 {
  12. private HandleRef swigCPtr;
  13. internal NatPunchthroughServer(IntPtr cPtr, bool cMemoryOwn) : base(RakNetPINVOKE.NatPunchthroughServer_SWIGUpcast(cPtr), cMemoryOwn) {
  14. swigCPtr = new HandleRef(this, cPtr);
  15. }
  16. internal static HandleRef getCPtr(NatPunchthroughServer obj) {
  17. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  18. }
  19. ~NatPunchthroughServer() {
  20. Dispose();
  21. }
  22. public override void Dispose() {
  23. lock(this) {
  24. if (swigCPtr.Handle != IntPtr.Zero) {
  25. if (swigCMemOwn) {
  26. swigCMemOwn = false;
  27. RakNetPINVOKE.delete_NatPunchthroughServer(swigCPtr);
  28. }
  29. swigCPtr = new HandleRef(null, IntPtr.Zero);
  30. }
  31. GC.SuppressFinalize(this);
  32. base.Dispose();
  33. }
  34. }
  35. public static NatPunchthroughServer GetInstance() {
  36. IntPtr cPtr = RakNetPINVOKE.NatPunchthroughServer_GetInstance();
  37. NatPunchthroughServer ret = (cPtr == IntPtr.Zero) ? null : new NatPunchthroughServer(cPtr, false);
  38. return ret;
  39. }
  40. public static void DestroyInstance(NatPunchthroughServer i) {
  41. RakNetPINVOKE.NatPunchthroughServer_DestroyInstance(NatPunchthroughServer.getCPtr(i));
  42. }
  43. public NatPunchthroughServer() : this(RakNetPINVOKE.new_NatPunchthroughServer(), true) {
  44. }
  45. public void SetDebugInterface(NatPunchthroughServerDebugInterface i) {
  46. RakNetPINVOKE.NatPunchthroughServer_SetDebugInterface(swigCPtr, NatPunchthroughServerDebugInterface.getCPtr(i));
  47. }
  48. public ulong lastUpdate {
  49. set {
  50. RakNetPINVOKE.NatPunchthroughServer_lastUpdate_set(swigCPtr, value);
  51. }
  52. get {
  53. ulong ret = RakNetPINVOKE.NatPunchthroughServer_lastUpdate_get(swigCPtr);
  54. return ret;
  55. }
  56. }
  57. }
  58. }
粤ICP备19079148号