Ejemplo n.º 1
0
 public RakString CopyData(string str) {
   RakString ret = new RakString(RakNetPINVOKE.RakString_CopyData__SWIG_1(swigCPtr, str), false);
   return ret;
 }
Ejemplo n.º 2
0
 public RakString CopyData(char c) {
   RakString ret = new RakString(RakNetPINVOKE.RakString_CopyData__SWIG_4(swigCPtr, c), false);
   return ret;
 }
Ejemplo n.º 3
0
 public RakString ToString(Table.ColumnType columnType) {
   RakString ret = new RakString(RakNetPINVOKE.Cell_ToString(swigCPtr, (int)columnType), true);
   return ret;
 }
 public void SetRemoteLoginPassword(RakString password) {
   RakNetPINVOKE.UDPProxyCoordinator_SetRemoteLoginPassword(swigCPtr, RakString.getCPtr(password));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 5
0
 public int StrICmp(RakString rhs) {
   int ret = RakNetPINVOKE.RakString_StrICmp(swigCPtr, RakString.getCPtr(rhs));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 6
0
 public RakString MakeFilePath() {
   RakString ret = new RakString(RakNetPINVOKE.RakString_MakeFilePath(swigCPtr), false);
   return ret;
 }
Ejemplo n.º 7
0
        public RakString Assign(string str, uint pos, uint n)
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_Assign(swigCPtr, str, pos, n), true);

            return(ret);
        }
Ejemplo n.º 8
0
 public void SetChar(uint index, RakString s) {
   RakNetPINVOKE.RakString_SetChar__SWIG_1(swigCPtr, index, RakString.getCPtr(s));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 9
0
        public RakString Get(uint position)
        {
            RakString ret = new RakString(RakNetPINVOKE.RakNetListRakString_Get(swigCPtr, position), false);

            return(ret);
        }
Ejemplo n.º 10
0
        public RakString Pop()
        {
            RakString ret = new RakString(RakNetPINVOKE.RakNetListRakString_Pop(swigCPtr), false);

            return(ret);
        }
Ejemplo n.º 11
0
 public void Replace(RakString input, RakString filler, uint position, string file, uint line)
 {
     RakNetPINVOKE.RakNetListRakString_Replace__SWIG_0(swigCPtr, RakString.getCPtr(input), RakString.getCPtr(filler), position, file, line);
     if (RakNetPINVOKE.SWIGPendingException.Pending)
     {
         throw RakNetPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 12
0
 public void SetConnectOnNewRemoteConnection(bool attemptConnection, RakString pw)
 {
     RakNetPINVOKE.FullyConnectedMesh2_SetConnectOnNewRemoteConnection(swigCPtr, attemptConnection, RakString.getCPtr(pw));
     if (RakNetPINVOKE.SWIGPendingException.Pending)
     {
         throw RakNetPINVOKE.SWIGPendingException.Retrieve();
     }
 }
 public virtual void OnWrongPassword(RakString usedPassword, UDPProxyServer proxyServerPlugin)
 {
     RakNetPINVOKE.CSharp_UDPProxyServerResultHandler_OnWrongPassword(swigCPtr, RakString.getCPtr(usedPassword), UDPProxyServer.getCPtr(proxyServerPlugin));
     if (RakNetPINVOKE.SWIGPendingException.Pending)
     {
         throw RakNetPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 14
0
 public bool Equals(RakString rhs) {
   bool ret = RakNetPINVOKE.RakString_Equals__SWIG_0(swigCPtr, RakString.getCPtr(rhs));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 15
0
        public RakString SubStr(uint index, uint count)
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_SubStr(swigCPtr, index, count), true);

            return(ret);
        }
Ejemplo n.º 16
0
 private bool OpNotEqual(RakString rhs) {
   bool ret = RakNetPINVOKE.RakString_OpNotEqual__SWIG_0(swigCPtr, RakString.getCPtr(rhs));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 17
0
        public static RakString NonVariadic(string str)
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_NonVariadic(str), true);

            return(ret);
        }
Ejemplo n.º 18
0
 public static RakString NonVariadic(string str) {
   RakString ret = new RakString(RakNetPINVOKE.RakString_NonVariadic(str), true);
   return ret;
 }
Ejemplo n.º 19
0
        public RakString URLDecode()
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_URLDecode(swigCPtr), false);

            return(ret);
        }
Ejemplo n.º 20
0
 public void SplitURI(RakString header, RakString domain, RakString path) {
   RakNetPINVOKE.RakString_SplitURI(swigCPtr, RakString.getCPtr(header), RakString.getCPtr(domain), RakString.getCPtr(path));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 21
0
 public void SplitURI(RakString header, RakString domain, RakString path)
 {
     RakNetPINVOKE.RakString_SplitURI(swigCPtr, RakString.getCPtr(header), RakString.getCPtr(domain), RakString.getCPtr(path));
     if (RakNetPINVOKE.SWIGPendingException.Pending)
     {
         throw RakNetPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Ejemplo n.º 22
0
 public void SetRemoteLoginPassword(RakString password) {
   RakNetPINVOKE.UDPProxyCoordinator_SetRemoteLoginPassword(swigCPtr, RakString.getCPtr(password));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 23
0
        public RakString SQLEscape()
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_SQLEscape(swigCPtr), false);

            return(ret);
        }
 public virtual void OnWrongPassword(RakString usedPassword, UDPProxyServer proxyServerPlugin)
 {
     RakNetPINVOKE.UDPProxyServerResultHandler_OnWrongPassword(swigCPtr, RakString.getCPtr(usedPassword), UDPProxyServer.getCPtr(proxyServerPlugin));
     if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 25
0
        public static RakString FormatForPOST(RakString uri, RakString contentType, uint port, RakString body)
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_FormatForPOST(RakString.getCPtr(uri), RakString.getCPtr(contentType), port, RakString.getCPtr(body)), true);

            if (RakNetPINVOKE.SWIGPendingException.Pending)
            {
                throw RakNetPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 26
0
 public RakString CopyData(RakString rhs) {
   RakString ret = new RakString(RakNetPINVOKE.RakString_CopyData__SWIG_0(swigCPtr, RakString.getCPtr(rhs)), false);
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 27
0
        public RakString MakeFilePath()
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_MakeFilePath(swigCPtr), false);

            return(ret);
        }
Ejemplo n.º 28
0
 public RakString CopyData(SWIGTYPE_p_unsigned_char str) {
   RakString ret = new RakString(RakNetPINVOKE.RakString_CopyData__SWIG_2(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(str)), false);
   return ret;
 }
Ejemplo n.º 29
0
        public static RakString OpPlus(RakString lhs, RakString rhs)
        {
            RakString ret = new RakString(RakNetPINVOKE.OpPlus(RakString.getCPtr(lhs), RakString.getCPtr(rhs)), true);

            if (RakNetPINVOKE.SWIGPendingException.Pending)
            {
                throw RakNetPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 30
0
 internal static HandleRef getCPtr(RakString obj) {
   return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Ejemplo n.º 31
0
        public RakString CopyData(RakString rhs)
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_CopyData__SWIG_0(swigCPtr, RakString.getCPtr(rhs)), false);

            if (RakNetPINVOKE.SWIGPendingException.Pending)
            {
                throw RakNetPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Ejemplo n.º 32
0
 private bool OpGreaterEquals(RakString right) {
   bool ret = RakNetPINVOKE.RakString_OpGreaterEquals(swigCPtr, RakString.getCPtr(right));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 33
0
 internal static HandleRef getCPtr(RakString obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Ejemplo n.º 34
0
 public RakString Assign(string str, uint pos, uint n) {
   RakString ret = new RakString(RakNetPINVOKE.RakString_Assign(swigCPtr, str, pos, n), true);
   return ret;
 }
Ejemplo n.º 35
0
        public RakString CopyData(string str)
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_CopyData__SWIG_1(swigCPtr, str), false);

            return(ret);
        }
Ejemplo n.º 36
0
 public RakString SubStr(uint index, uint count) {
   RakString ret = new RakString(RakNetPINVOKE.RakString_SubStr(swigCPtr, index, count), true);
   return ret;
 }
Ejemplo n.º 37
0
        public RakString CopyData(SWIGTYPE_p_unsigned_char str)
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_CopyData__SWIG_2(swigCPtr, SWIGTYPE_p_unsigned_char.getCPtr(str)), false);

            return(ret);
        }
Ejemplo n.º 38
0
 public static uint ToInteger(RakString rs) {
   uint ret = RakNetPINVOKE.RakString_ToInteger__SWIG_1(RakString.getCPtr(rs));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 39
0
        public RakString CopyData(char c)
        {
            RakString ret = new RakString(RakNetPINVOKE.RakString_CopyData__SWIG_4(swigCPtr, c), false);

            return(ret);
        }
Ejemplo n.º 40
0
 public RakString URLDecode() {
   RakString ret = new RakString(RakNetPINVOKE.RakString_URLDecode(swigCPtr), false);
   return ret;
 }
Ejemplo n.º 41
0
 public bool SerializeCompressedDelta(bool writeToBitstream, RakString inOutCurrentValue, RakString lastValue) {
   bool ret = RakNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_16(swigCPtr, writeToBitstream, RakString.getCPtr(inOutCurrentValue), RakString.getCPtr(lastValue));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 42
0
 public RakString SQLEscape() {
   RakString ret = new RakString(RakNetPINVOKE.RakString_SQLEscape(swigCPtr), false);
   return ret;
 }
Ejemplo n.º 43
0
 public bool SerializeCompressedDelta(bool writeToBitstream, RakString inOutTemplateVar) {
   bool ret = RakNetPINVOKE.BitStream_SerializeCompressedDelta__SWIG_17(swigCPtr, writeToBitstream, RakString.getCPtr(inOutTemplateVar));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 44
0
 public static int RakStringComp(RakString key, RakString data) {
   int ret = RakNetPINVOKE.RakString_RakStringComp(RakString.getCPtr(key), RakString.getCPtr(data));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 45
0
 public void Write(RakString inTemplateVar) {
   RakNetPINVOKE.BitStream_Write__SWIG_16(swigCPtr, RakString.getCPtr(inTemplateVar));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 46
0
        static void Main(string[] args)
        {
            if (!File.Exists("RakNet.dll"))
            {
                Console.WriteLine("The SWIG build of the DLL has not been copied to the executable directory\nCopy from Swig/SwigWindowsCSharpSample/SwigTestApp/bin/X86/Debug/RakNet.dll to\nSwigWindowsCSharpSample/SwigTestApp/bin/Debug/RakNet.dll\nPress enter to quit.");
                Console.Read();
                return;
            }

            try
            {
                RakString dllCallTest = new RakString();
            }
            catch (Exception e)
            {
                Console.WriteLine("DLL issue\nAdd SwigOutput/CplusDLLIncludes/RakNetWrap.cxx to the project\nDLL_Swig/RakNet.sln and rebuild.\nPress enter to quit.");
                Console.Read();
                return;
            }

            Packet testPacket;
            int loopNumber;
            BitStream stringTestSendBitStream = new BitStream();
            BitStream rakStringTestSendBitStream = new BitStream();
            BitStream receiveBitStream = new BitStream();
            String holdingString;
            TimeSpan startTimeSpan;
            RakString rakStringTest = new RakString();

            RakPeerInterface testClient = RakPeer.GetInstance();
            
            testClient.Startup(1, new SocketDescriptor(60000, "127.0.0.1"), 1);

            RakPeerInterface testServer = RakPeer.GetInstance();
            testServer.Startup(1, new SocketDescriptor(60001, "127.0.0.1"), 1);
            testServer.SetMaximumIncomingConnections(1);

            Console.WriteLine("Send and receive loop using BitStream.\nBitStream read done into RakString");

            testClient.Connect("127.0.0.1", 60001, "", 0);

            String sendString = "The test string";
            stringTestSendBitStream.Write((byte)DefaultMessageIDTypes.ID_USER_PACKET_ENUM);
            stringTestSendBitStream.Write(sendString);

            RakString testRakString = new RakString("Test RakString");
            rakStringTestSendBitStream.Write((byte)DefaultMessageIDTypes.ID_USER_PACKET_ENUM);
            rakStringTestSendBitStream.Write(testRakString);

            startTimeSpan = (DateTime.UtcNow - new DateTime(1970, 1, 1));
            loopNumber = 0;

            while (startTimeSpan.TotalSeconds + 5 > (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds)
            {
                testPacket = testServer.Receive();
                if (testPacket != null && testPacket.data[0] == (byte)DefaultMessageIDTypes.ID_USER_PACKET_ENUM)
                {
                    receiveBitStream.Reset();
                    receiveBitStream.Write(testPacket.data, testPacket.length);
                    receiveBitStream.IgnoreBytes(1);
                    receiveBitStream.Read(rakStringTest);
                    Console.WriteLine("Loop number: " + loopNumber + "\nData: " + rakStringTest.C_String());
                }
                testServer.DeallocatePacket(testPacket);
                loopNumber++;
                System.Threading.Thread.Sleep(50);
                testClient.Send(rakStringTestSendBitStream, PacketPriority.LOW_PRIORITY, PacketReliability.RELIABLE_ORDERED, (char)0, new AddressOrGUID(new SystemAddress("127.0.0.1", 60001)), false);
            }

            Console.WriteLine("String send and receive loop using BitStream.\nBitStream read done into String");

            SystemAddress[] remoteSystems;
            ushort numberOfSystems=1;
            testServer.GetConnectionList(out remoteSystems, ref numberOfSystems);

            startTimeSpan = (DateTime.UtcNow - new DateTime(1970, 1, 1));
            loopNumber = 0;
            while (startTimeSpan.TotalSeconds + 5 > (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds)
            {
                testPacket = testServer.Receive();
                if (testPacket != null && testPacket.data[0] == (byte)DefaultMessageIDTypes.ID_USER_PACKET_ENUM)
                {
                    receiveBitStream.Reset();
                    receiveBitStream.Write(testPacket.data, testPacket.length);
                    receiveBitStream.IgnoreBytes(1);
                    receiveBitStream.Read(out holdingString);
                    Console.WriteLine("Loop number: " + loopNumber + "\nData: " + holdingString);
                }
                testServer.DeallocatePacket(testPacket);
                loopNumber++;
                System.Threading.Thread.Sleep(50);
                SystemAddress sa = RakNet.RakNet.UNASSIGNED_SYSTEM_ADDRESS;
                testClient.Send(stringTestSendBitStream, PacketPriority.LOW_PRIORITY, PacketReliability.RELIABLE_ORDERED, (char)0, new AddressOrGUID(new SystemAddress("127.0.0.1", 60001)), false);
            }
            //If RakString is not freed before program exit it will crash
            rakStringTest.Dispose();
            testRakString.Dispose();

            RakPeer.DestroyInstance(testClient);
            RakPeer.DestroyInstance(testServer);
            Console.WriteLine("Demo complete. Press Enter.");
            Console.Read();
        }
Ejemplo n.º 47
0
 public void WriteDelta(RakString currentValue, RakString lastValue) {
   RakNetPINVOKE.BitStream_WriteDelta__SWIG_20(swigCPtr, RakString.getCPtr(currentValue), RakString.getCPtr(lastValue));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 48
0
 public static RakString OpPlus(RakString lhs, RakString rhs) {
   RakString ret = new RakString(RakNetPINVOKE.OpPlus(RakString.getCPtr(lhs), RakString.getCPtr(rhs)), true);
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Ejemplo n.º 49
0
 public RakString(RakString rhs) : this(RakNetPINVOKE.new_RakString__SWIG_4(RakString.getCPtr(rhs)), true) {
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 50
0
 public void SetConnectOnNewRemoteConnection(bool attemptConnection, RakString pw) {
   RakNetPINVOKE.FullyConnectedMesh2_SetConnectOnNewRemoteConnection(swigCPtr, attemptConnection, RakString.getCPtr(pw));
   if (RakNetPINVOKE.SWIGPendingException.Pending) throw RakNetPINVOKE.SWIGPendingException.Retrieve();
 }
Ejemplo n.º 51
0
 public RakWString(RakString right) : this(RakNetPINVOKE.new_RakWString__SWIG_1(RakString.getCPtr(right)), true)
 {
     if (RakNetPINVOKE.SWIGPendingException.Pending)
     {
         throw RakNetPINVOKE.SWIGPendingException.Retrieve();
     }
 }