UDPProxyClient.cs 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 UDPProxyClient : PluginInterface2 {
  12. private HandleRef swigCPtr;
  13. internal UDPProxyClient(IntPtr cPtr, bool cMemoryOwn) : base(RakNetPINVOKE.UDPProxyClient_SWIGUpcast(cPtr), cMemoryOwn) {
  14. swigCPtr = new HandleRef(this, cPtr);
  15. }
  16. internal static HandleRef getCPtr(UDPProxyClient obj) {
  17. return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  18. }
  19. ~UDPProxyClient() {
  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_UDPProxyClient(swigCPtr);
  28. }
  29. swigCPtr = new HandleRef(null, IntPtr.Zero);
  30. }
  31. GC.SuppressFinalize(this);
  32. base.Dispose();
  33. }
  34. }
  35. public static UDPProxyClient GetInstance() {
  36. IntPtr cPtr = RakNetPINVOKE.UDPProxyClient_GetInstance();
  37. UDPProxyClient ret = (cPtr == IntPtr.Zero) ? null : new UDPProxyClient(cPtr, false);
  38. return ret;
  39. }
  40. public static void DestroyInstance(UDPProxyClient i) {
  41. RakNetPINVOKE.UDPProxyClient_DestroyInstance(UDPProxyClient.getCPtr(i));
  42. }
  43. public UDPProxyClient() : this(RakNetPINVOKE.new_UDPProxyClient(), true) {
  44. }
  45. public void SetResultHandler(UDPProxyClientResultHandler rh) {
  46. RakNetPINVOKE.UDPProxyClient_SetResultHandler(swigCPtr, UDPProxyClientResultHandler.getCPtr(rh));
  47. }
  48. public bool RequestForwarding(SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddressAsSeenFromCoordinator, uint timeoutOnNoDataMS, BitStream serverSelectionBitstream) {
  49. bool ret = RakNetPINVOKE.UDPProxyClient_RequestForwarding__SWIG_0(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddressAsSeenFromCoordinator), timeoutOnNoDataMS, BitStream.getCPtr(serverSelectionBitstream));
  50. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  51. return ret;
  52. }
  53. public bool RequestForwarding(SystemAddress proxyCoordinator, SystemAddress sourceAddress, SystemAddress targetAddressAsSeenFromCoordinator, uint timeoutOnNoDataMS) {
  54. bool ret = RakNetPINVOKE.UDPProxyClient_RequestForwarding__SWIG_1(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), SystemAddress.getCPtr(targetAddressAsSeenFromCoordinator), timeoutOnNoDataMS);
  55. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  56. return ret;
  57. }
  58. public bool RequestForwarding(SystemAddress proxyCoordinator, SystemAddress sourceAddress, RakNetGUID targetGuid, uint timeoutOnNoDataMS, BitStream serverSelectionBitstream) {
  59. bool ret = RakNetPINVOKE.UDPProxyClient_RequestForwarding__SWIG_2(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), RakNetGUID.getCPtr(targetGuid), timeoutOnNoDataMS, BitStream.getCPtr(serverSelectionBitstream));
  60. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  61. return ret;
  62. }
  63. public bool RequestForwarding(SystemAddress proxyCoordinator, SystemAddress sourceAddress, RakNetGUID targetGuid, uint timeoutOnNoDataMS) {
  64. bool ret = RakNetPINVOKE.UDPProxyClient_RequestForwarding__SWIG_3(swigCPtr, SystemAddress.getCPtr(proxyCoordinator), SystemAddress.getCPtr(sourceAddress), RakNetGUID.getCPtr(targetGuid), timeoutOnNoDataMS);
  65. if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
  66. return ret;
  67. }
  68. }
  69. }
粤ICP备19079148号