/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ namespace SLNet { using System; using System.Runtime.InteropServices; public class NatTypeDetectionClient : PluginInterface2 { private HandleRef swigCPtr; internal NatTypeDetectionClient(IntPtr cPtr, bool cMemoryOwn) : base(SLikeNetPINVOKE.NatTypeDetectionClient_SWIGUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(NatTypeDetectionClient obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } ~NatTypeDetectionClient() { Dispose(); } public override void Dispose() { lock(this) { if (swigCPtr.Handle != IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; SLikeNetPINVOKE.delete_NatTypeDetectionClient(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); } GC.SuppressFinalize(this); base.Dispose(); } } public static NatTypeDetectionClient GetInstance() { IntPtr cPtr = SLikeNetPINVOKE.NatTypeDetectionClient_GetInstance(); NatTypeDetectionClient ret = (cPtr == IntPtr.Zero) ? null : new NatTypeDetectionClient(cPtr, false); return ret; } public static void DestroyInstance(NatTypeDetectionClient i) { SLikeNetPINVOKE.NatTypeDetectionClient_DestroyInstance(NatTypeDetectionClient.getCPtr(i)); } public NatTypeDetectionClient() : this(SLikeNetPINVOKE.new_NatTypeDetectionClient(), true) { } public void DetectNATType(SystemAddress _serverAddress) { SLikeNetPINVOKE.NatTypeDetectionClient_DetectNATType(swigCPtr, SystemAddress.getCPtr(_serverAddress)); if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve(); } public virtual void OnRNS2Recv(SWIGTYPE_p_RNS2RecvStruct recvStruct) { SLikeNetPINVOKE.NatTypeDetectionClient_OnRNS2Recv(swigCPtr, SWIGTYPE_p_RNS2RecvStruct.getCPtr(recvStruct)); } public virtual void DeallocRNS2RecvStruct(SWIGTYPE_p_RNS2RecvStruct s, string file, uint line) { SLikeNetPINVOKE.NatTypeDetectionClient_DeallocRNS2RecvStruct(swigCPtr, SWIGTYPE_p_RNS2RecvStruct.getCPtr(s), file, line); } public virtual SWIGTYPE_p_RNS2RecvStruct AllocRNS2RecvStruct(string file, uint line) { IntPtr cPtr = SLikeNetPINVOKE.NatTypeDetectionClient_AllocRNS2RecvStruct(swigCPtr, file, line); SWIGTYPE_p_RNS2RecvStruct ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_RNS2RecvStruct(cPtr, false); return ret; } } }