Files
SLikeNet/bindings/csharp/interfaces/RakPeerInterface.cs
2025-11-24 14:19:51 +05:30

624 lines
30 KiB
C#

/* ----------------------------------------------------------------------------
* 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 RakPeerInterface : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal RakPeerInterface(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(RakPeerInterface obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~RakPeerInterface() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
SLikeNetPINVOKE.delete_RakPeerInterface(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual void GetIncomingPassword(ref string passwordData, ref int passwordDataLength )
{
passwordData=CSharpGetIncomingPasswordHelper(passwordData,ref passwordDataLength);
}
public virtual void GetOfflinePingResponse( byte[] inOutByteArray, out uint length )
{
CSharpGetOfflinePingResponseHelper(inOutByteArray,out length);
}
public virtual bool GetConnectionList(out SystemAddress[] remoteSystems, ref ushort numberOfSystems)
{
RakNetListSystemAddress passVal= new RakNetListSystemAddress();
bool returnVal = GetConnectionList(passVal,ref numberOfSystems);
SystemAddress[] outVal = new SystemAddress[numberOfSystems];
for (int i=0; i<numberOfSystems;i++)
{
outVal[i]=passVal[i];
}
remoteSystems=outVal;
return returnVal;
}
public static RakPeerInterface GetInstance() {
IntPtr cPtr = SLikeNetPINVOKE.RakPeerInterface_GetInstance();
RakPeerInterface ret = (cPtr == IntPtr.Zero) ? null : new RakPeerInterface(cPtr, false);
return ret;
}
public static void DestroyInstance(RakPeerInterface i) {
SLikeNetPINVOKE.RakPeerInterface_DestroyInstance(RakPeerInterface.getCPtr(i));
}
public virtual StartupResult Startup(uint maxConnections, SocketDescriptor socketDescriptors, uint socketDescriptorCount, int threadPriority) {
StartupResult ret = (StartupResult)SLikeNetPINVOKE.RakPeerInterface_Startup__SWIG_0(swigCPtr, maxConnections, SocketDescriptor.getCPtr(socketDescriptors), socketDescriptorCount, threadPriority);
return ret;
}
public virtual StartupResult Startup(uint maxConnections, SocketDescriptor socketDescriptors, uint socketDescriptorCount) {
StartupResult ret = (StartupResult)SLikeNetPINVOKE.RakPeerInterface_Startup__SWIG_1(swigCPtr, maxConnections, SocketDescriptor.getCPtr(socketDescriptors), socketDescriptorCount);
return ret;
}
public virtual bool InitializeSecurity(string publicKey, string privateKey, bool bRequireClientKey) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_InitializeSecurity__SWIG_0(swigCPtr, publicKey, privateKey, bRequireClientKey);
return ret;
}
public virtual bool InitializeSecurity(string publicKey, string privateKey) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_InitializeSecurity__SWIG_1(swigCPtr, publicKey, privateKey);
return ret;
}
public virtual void DisableSecurity() {
SLikeNetPINVOKE.RakPeerInterface_DisableSecurity(swigCPtr);
}
public virtual void AddToSecurityExceptionList(string ip) {
SLikeNetPINVOKE.RakPeerInterface_AddToSecurityExceptionList(swigCPtr, ip);
}
public virtual void RemoveFromSecurityExceptionList(string ip) {
SLikeNetPINVOKE.RakPeerInterface_RemoveFromSecurityExceptionList(swigCPtr, ip);
}
public virtual bool IsInSecurityExceptionList(string ip) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_IsInSecurityExceptionList(swigCPtr, ip);
return ret;
}
public virtual void SetMaximumIncomingConnections(ushort numberAllowed) {
SLikeNetPINVOKE.RakPeerInterface_SetMaximumIncomingConnections(swigCPtr, numberAllowed);
}
public virtual uint GetMaximumIncomingConnections() {
uint ret = SLikeNetPINVOKE.RakPeerInterface_GetMaximumIncomingConnections(swigCPtr);
return ret;
}
public virtual ushort NumberOfConnections() {
ushort ret = SLikeNetPINVOKE.RakPeerInterface_NumberOfConnections(swigCPtr);
return ret;
}
public virtual void SetIncomingPassword(string passwordData, int passwordDataLength) {
SLikeNetPINVOKE.RakPeerInterface_SetIncomingPassword__SWIG_0(swigCPtr, passwordData, passwordDataLength);
}
public virtual ConnectionAttemptResult Connect(string host, ushort remotePort, string passwordData, int passwordDataLength, PublicKey publicKey, uint connectionSocketIndex, uint sendConnectionAttemptCount, uint timeBetweenSendConnectionAttemptsMS, uint timeoutTime) {
ConnectionAttemptResult ret = (ConnectionAttemptResult)SLikeNetPINVOKE.RakPeerInterface_Connect__SWIG_0(swigCPtr, host, remotePort, passwordData, passwordDataLength, PublicKey.getCPtr(publicKey), connectionSocketIndex, sendConnectionAttemptCount, timeBetweenSendConnectionAttemptsMS, timeoutTime);
return ret;
}
public virtual ConnectionAttemptResult Connect(string host, ushort remotePort, string passwordData, int passwordDataLength, PublicKey publicKey, uint connectionSocketIndex, uint sendConnectionAttemptCount, uint timeBetweenSendConnectionAttemptsMS) {
ConnectionAttemptResult ret = (ConnectionAttemptResult)SLikeNetPINVOKE.RakPeerInterface_Connect__SWIG_1(swigCPtr, host, remotePort, passwordData, passwordDataLength, PublicKey.getCPtr(publicKey), connectionSocketIndex, sendConnectionAttemptCount, timeBetweenSendConnectionAttemptsMS);
return ret;
}
public virtual ConnectionAttemptResult Connect(string host, ushort remotePort, string passwordData, int passwordDataLength, PublicKey publicKey, uint connectionSocketIndex, uint sendConnectionAttemptCount) {
ConnectionAttemptResult ret = (ConnectionAttemptResult)SLikeNetPINVOKE.RakPeerInterface_Connect__SWIG_2(swigCPtr, host, remotePort, passwordData, passwordDataLength, PublicKey.getCPtr(publicKey), connectionSocketIndex, sendConnectionAttemptCount);
return ret;
}
public virtual ConnectionAttemptResult Connect(string host, ushort remotePort, string passwordData, int passwordDataLength, PublicKey publicKey, uint connectionSocketIndex) {
ConnectionAttemptResult ret = (ConnectionAttemptResult)SLikeNetPINVOKE.RakPeerInterface_Connect__SWIG_3(swigCPtr, host, remotePort, passwordData, passwordDataLength, PublicKey.getCPtr(publicKey), connectionSocketIndex);
return ret;
}
public virtual ConnectionAttemptResult Connect(string host, ushort remotePort, string passwordData, int passwordDataLength, PublicKey publicKey) {
ConnectionAttemptResult ret = (ConnectionAttemptResult)SLikeNetPINVOKE.RakPeerInterface_Connect__SWIG_4(swigCPtr, host, remotePort, passwordData, passwordDataLength, PublicKey.getCPtr(publicKey));
return ret;
}
public virtual ConnectionAttemptResult Connect(string host, ushort remotePort, string passwordData, int passwordDataLength) {
ConnectionAttemptResult ret = (ConnectionAttemptResult)SLikeNetPINVOKE.RakPeerInterface_Connect__SWIG_5(swigCPtr, host, remotePort, passwordData, passwordDataLength);
return ret;
}
public virtual void Shutdown(uint blockDuration, byte orderingChannel, PacketPriority disconnectionNotificationPriority) {
SLikeNetPINVOKE.RakPeerInterface_Shutdown__SWIG_0(swigCPtr, blockDuration, orderingChannel, (int)disconnectionNotificationPriority);
}
public virtual void Shutdown(uint blockDuration, byte orderingChannel) {
SLikeNetPINVOKE.RakPeerInterface_Shutdown__SWIG_1(swigCPtr, blockDuration, orderingChannel);
}
public virtual void Shutdown(uint blockDuration) {
SLikeNetPINVOKE.RakPeerInterface_Shutdown__SWIG_2(swigCPtr, blockDuration);
}
public virtual bool IsActive() {
bool ret = SLikeNetPINVOKE.RakPeerInterface_IsActive(swigCPtr);
return ret;
}
public virtual uint GetNextSendReceipt() {
uint ret = SLikeNetPINVOKE.RakPeerInterface_GetNextSendReceipt(swigCPtr);
return ret;
}
public virtual uint IncrementNextSendReceipt() {
uint ret = SLikeNetPINVOKE.RakPeerInterface_IncrementNextSendReceipt(swigCPtr);
return ret;
}
public virtual uint Send(string data, int length, PacketPriority priority, PacketReliability reliability, char orderingChannel, AddressOrGUID systemIdentifier, bool broadcast, uint forceReceiptNumber) {
uint ret = SLikeNetPINVOKE.RakPeerInterface_Send__SWIG_0(swigCPtr, data, length, (int)priority, (int)reliability, orderingChannel, AddressOrGUID.getCPtr(systemIdentifier), broadcast, forceReceiptNumber);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual uint Send(string data, int length, PacketPriority priority, PacketReliability reliability, char orderingChannel, AddressOrGUID systemIdentifier, bool broadcast) {
uint ret = SLikeNetPINVOKE.RakPeerInterface_Send__SWIG_1(swigCPtr, data, length, (int)priority, (int)reliability, orderingChannel, AddressOrGUID.getCPtr(systemIdentifier), broadcast);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual void SendLoopback(string data, int length) {
SLikeNetPINVOKE.RakPeerInterface_SendLoopback__SWIG_0(swigCPtr, data, length);
}
public virtual uint Send(BitStream bitStream, PacketPriority priority, PacketReliability reliability, char orderingChannel, AddressOrGUID systemIdentifier, bool broadcast, uint forceReceiptNumber) {
uint ret = SLikeNetPINVOKE.RakPeerInterface_Send__SWIG_2(swigCPtr, BitStream.getCPtr(bitStream), (int)priority, (int)reliability, orderingChannel, AddressOrGUID.getCPtr(systemIdentifier), broadcast, forceReceiptNumber);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual uint Send(BitStream bitStream, PacketPriority priority, PacketReliability reliability, char orderingChannel, AddressOrGUID systemIdentifier, bool broadcast) {
uint ret = SLikeNetPINVOKE.RakPeerInterface_Send__SWIG_3(swigCPtr, BitStream.getCPtr(bitStream), (int)priority, (int)reliability, orderingChannel, AddressOrGUID.getCPtr(systemIdentifier), broadcast);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual Packet Receive() {
IntPtr cPtr = SLikeNetPINVOKE.RakPeerInterface_Receive(swigCPtr);
Packet ret = (cPtr == IntPtr.Zero) ? null : new Packet(cPtr, false);
return ret;
}
public virtual void DeallocatePacket(Packet packet) {
SLikeNetPINVOKE.RakPeerInterface_DeallocatePacket(swigCPtr, Packet.getCPtr(packet));
}
public virtual uint GetMaximumNumberOfPeers() {
uint ret = SLikeNetPINVOKE.RakPeerInterface_GetMaximumNumberOfPeers(swigCPtr);
return ret;
}
public virtual void CloseConnection(AddressOrGUID target, bool sendDisconnectionNotification, byte orderingChannel, PacketPriority disconnectionNotificationPriority) {
SLikeNetPINVOKE.RakPeerInterface_CloseConnection__SWIG_0(swigCPtr, AddressOrGUID.getCPtr(target), sendDisconnectionNotification, orderingChannel, (int)disconnectionNotificationPriority);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void CloseConnection(AddressOrGUID target, bool sendDisconnectionNotification, byte orderingChannel) {
SLikeNetPINVOKE.RakPeerInterface_CloseConnection__SWIG_1(swigCPtr, AddressOrGUID.getCPtr(target), sendDisconnectionNotification, orderingChannel);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void CloseConnection(AddressOrGUID target, bool sendDisconnectionNotification) {
SLikeNetPINVOKE.RakPeerInterface_CloseConnection__SWIG_2(swigCPtr, AddressOrGUID.getCPtr(target), sendDisconnectionNotification);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual ConnectionState GetConnectionState(AddressOrGUID systemIdentifier) {
ConnectionState ret = (ConnectionState)SLikeNetPINVOKE.RakPeerInterface_GetConnectionState(swigCPtr, AddressOrGUID.getCPtr(systemIdentifier));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual void CancelConnectionAttempt(SystemAddress target) {
SLikeNetPINVOKE.RakPeerInterface_CancelConnectionAttempt(swigCPtr, SystemAddress.getCPtr(target));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual int GetIndexFromSystemAddress(SystemAddress systemAddress) {
int ret = SLikeNetPINVOKE.RakPeerInterface_GetIndexFromSystemAddress(swigCPtr, SystemAddress.getCPtr(systemAddress));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual SystemAddress GetSystemAddressFromIndex(uint index) {
SystemAddress ret = new SystemAddress(SLikeNetPINVOKE.RakPeerInterface_GetSystemAddressFromIndex(swigCPtr, index), true);
return ret;
}
public virtual RakNetGUID GetGUIDFromIndex(uint index) {
RakNetGUID ret = new RakNetGUID(SLikeNetPINVOKE.RakPeerInterface_GetGUIDFromIndex(swigCPtr, index), true);
return ret;
}
public virtual void GetSystemList(RakNetListSystemAddress addresses, RakNetListRakNetGUID guids) {
SLikeNetPINVOKE.RakPeerInterface_GetSystemList(swigCPtr, RakNetListSystemAddress.getCPtr(addresses), RakNetListRakNetGUID.getCPtr(guids));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void AddToBanList(string IP, uint milliseconds) {
SLikeNetPINVOKE.RakPeerInterface_AddToBanList__SWIG_0(swigCPtr, IP, milliseconds);
}
public virtual void AddToBanList(string IP) {
SLikeNetPINVOKE.RakPeerInterface_AddToBanList__SWIG_1(swigCPtr, IP);
}
public virtual void RemoveFromBanList(string IP) {
SLikeNetPINVOKE.RakPeerInterface_RemoveFromBanList(swigCPtr, IP);
}
public virtual void ClearBanList() {
SLikeNetPINVOKE.RakPeerInterface_ClearBanList(swigCPtr);
}
public virtual bool IsBanned(string IP) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_IsBanned(swigCPtr, IP);
return ret;
}
public virtual void SetLimitIPConnectionFrequency(bool b) {
SLikeNetPINVOKE.RakPeerInterface_SetLimitIPConnectionFrequency(swigCPtr, b);
}
public virtual void Ping(SystemAddress target) {
SLikeNetPINVOKE.RakPeerInterface_Ping__SWIG_0(swigCPtr, SystemAddress.getCPtr(target));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual bool Ping(string host, ushort remotePort, bool onlyReplyOnAcceptingConnections, uint connectionSocketIndex) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_Ping__SWIG_1(swigCPtr, host, remotePort, onlyReplyOnAcceptingConnections, connectionSocketIndex);
return ret;
}
public virtual bool Ping(string host, ushort remotePort, bool onlyReplyOnAcceptingConnections) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_Ping__SWIG_2(swigCPtr, host, remotePort, onlyReplyOnAcceptingConnections);
return ret;
}
public virtual int GetAveragePing(AddressOrGUID systemIdentifier) {
int ret = SLikeNetPINVOKE.RakPeerInterface_GetAveragePing(swigCPtr, AddressOrGUID.getCPtr(systemIdentifier));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual int GetLastPing(AddressOrGUID systemIdentifier) {
int ret = SLikeNetPINVOKE.RakPeerInterface_GetLastPing(swigCPtr, AddressOrGUID.getCPtr(systemIdentifier));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual int GetLowestPing(AddressOrGUID systemIdentifier) {
int ret = SLikeNetPINVOKE.RakPeerInterface_GetLowestPing(swigCPtr, AddressOrGUID.getCPtr(systemIdentifier));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual void SetOccasionalPing(bool doPing) {
SLikeNetPINVOKE.RakPeerInterface_SetOccasionalPing(swigCPtr, doPing);
}
public virtual ulong GetClockDifferential(AddressOrGUID systemIdentifier) {
ulong ret = SLikeNetPINVOKE.RakPeerInterface_GetClockDifferential(swigCPtr, AddressOrGUID.getCPtr(systemIdentifier));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual void SetOfflinePingResponse(string data, uint length) {
SLikeNetPINVOKE.RakPeerInterface_SetOfflinePingResponse__SWIG_0(swigCPtr, data, length);
}
public virtual SystemAddress GetInternalID(SystemAddress systemAddress, int index) {
SystemAddress ret = new SystemAddress(SLikeNetPINVOKE.RakPeerInterface_GetInternalID__SWIG_0(swigCPtr, SystemAddress.getCPtr(systemAddress), index), true);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual SystemAddress GetInternalID(SystemAddress systemAddress) {
SystemAddress ret = new SystemAddress(SLikeNetPINVOKE.RakPeerInterface_GetInternalID__SWIG_1(swigCPtr, SystemAddress.getCPtr(systemAddress)), true);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual SystemAddress GetInternalID() {
SystemAddress ret = new SystemAddress(SLikeNetPINVOKE.RakPeerInterface_GetInternalID__SWIG_2(swigCPtr), true);
return ret;
}
public virtual void SetInternalID(SystemAddress systemAddress, int index) {
SLikeNetPINVOKE.RakPeerInterface_SetInternalID__SWIG_0(swigCPtr, SystemAddress.getCPtr(systemAddress), index);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void SetInternalID(SystemAddress systemAddress) {
SLikeNetPINVOKE.RakPeerInterface_SetInternalID__SWIG_1(swigCPtr, SystemAddress.getCPtr(systemAddress));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual SystemAddress GetExternalID(SystemAddress target) {
SystemAddress ret = new SystemAddress(SLikeNetPINVOKE.RakPeerInterface_GetExternalID(swigCPtr, SystemAddress.getCPtr(target)), true);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual RakNetGUID GetMyGUID() {
RakNetGUID ret = new RakNetGUID(SLikeNetPINVOKE.RakPeerInterface_GetMyGUID(swigCPtr), true);
return ret;
}
public virtual SystemAddress GetMyBoundAddress(int socketIndex) {
SystemAddress ret = new SystemAddress(SLikeNetPINVOKE.RakPeerInterface_GetMyBoundAddress__SWIG_0(swigCPtr, socketIndex), true);
return ret;
}
public virtual SystemAddress GetMyBoundAddress() {
SystemAddress ret = new SystemAddress(SLikeNetPINVOKE.RakPeerInterface_GetMyBoundAddress__SWIG_1(swigCPtr), true);
return ret;
}
public static ulong Get64BitUniqueRandomNumber() {
ulong ret = SLikeNetPINVOKE.RakPeerInterface_Get64BitUniqueRandomNumber();
return ret;
}
public virtual RakNetGUID GetGuidFromSystemAddress(SystemAddress input) {
RakNetGUID ret = new RakNetGUID(SLikeNetPINVOKE.RakPeerInterface_GetGuidFromSystemAddress(swigCPtr, SystemAddress.getCPtr(input)), false);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual SystemAddress GetSystemAddressFromGuid(RakNetGUID input) {
SystemAddress ret = new SystemAddress(SLikeNetPINVOKE.RakPeerInterface_GetSystemAddressFromGuid(swigCPtr, RakNetGUID.getCPtr(input)), true);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual bool GetClientPublicKeyFromSystemAddress(SystemAddress input, string client_public_key) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_GetClientPublicKeyFromSystemAddress(swigCPtr, SystemAddress.getCPtr(input), client_public_key);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual void SetTimeoutTime(uint timeMS, SystemAddress target) {
SLikeNetPINVOKE.RakPeerInterface_SetTimeoutTime(swigCPtr, timeMS, SystemAddress.getCPtr(target));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual uint GetTimeoutTime(SystemAddress target) {
uint ret = SLikeNetPINVOKE.RakPeerInterface_GetTimeoutTime(swigCPtr, SystemAddress.getCPtr(target));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual int GetMTUSize(SystemAddress target) {
int ret = SLikeNetPINVOKE.RakPeerInterface_GetMTUSize(swigCPtr, SystemAddress.getCPtr(target));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual uint GetNumberOfAddresses() {
uint ret = SLikeNetPINVOKE.RakPeerInterface_GetNumberOfAddresses(swigCPtr);
return ret;
}
public virtual string GetLocalIP(uint index) {
string ret = SLikeNetPINVOKE.RakPeerInterface_GetLocalIP(swigCPtr, index);
return ret;
}
public virtual bool IsLocalIP(string ip) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_IsLocalIP(swigCPtr, ip);
return ret;
}
public virtual void AllowConnectionResponseIPMigration(bool allow) {
SLikeNetPINVOKE.RakPeerInterface_AllowConnectionResponseIPMigration(swigCPtr, allow);
}
public virtual bool AdvertiseSystem(string host, ushort remotePort, string data, int dataLength, uint connectionSocketIndex) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_AdvertiseSystem__SWIG_0(swigCPtr, host, remotePort, data, dataLength, connectionSocketIndex);
return ret;
}
public virtual bool AdvertiseSystem(string host, ushort remotePort, string data, int dataLength) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_AdvertiseSystem__SWIG_1(swigCPtr, host, remotePort, data, dataLength);
return ret;
}
public virtual void SetSplitMessageProgressInterval(int interval) {
SLikeNetPINVOKE.RakPeerInterface_SetSplitMessageProgressInterval(swigCPtr, interval);
}
public virtual int GetSplitMessageProgressInterval() {
int ret = SLikeNetPINVOKE.RakPeerInterface_GetSplitMessageProgressInterval(swigCPtr);
return ret;
}
public virtual void SetUnreliableTimeout(uint timeoutMS) {
SLikeNetPINVOKE.RakPeerInterface_SetUnreliableTimeout(swigCPtr, timeoutMS);
}
public virtual void SendTTL(string host, ushort remotePort, int ttl, uint connectionSocketIndex) {
SLikeNetPINVOKE.RakPeerInterface_SendTTL__SWIG_0(swigCPtr, host, remotePort, ttl, connectionSocketIndex);
}
public virtual void SendTTL(string host, ushort remotePort, int ttl) {
SLikeNetPINVOKE.RakPeerInterface_SendTTL__SWIG_1(swigCPtr, host, remotePort, ttl);
}
public virtual void AttachPlugin(PluginInterface2 plugin) {
SLikeNetPINVOKE.RakPeerInterface_AttachPlugin(swigCPtr, PluginInterface2.getCPtr(plugin));
}
public virtual void DetachPlugin(PluginInterface2 messageHandler) {
SLikeNetPINVOKE.RakPeerInterface_DetachPlugin(swigCPtr, PluginInterface2.getCPtr(messageHandler));
}
public virtual void PushBackPacket(Packet packet, bool pushAtHead) {
SLikeNetPINVOKE.RakPeerInterface_PushBackPacket(swigCPtr, Packet.getCPtr(packet), pushAtHead);
}
public virtual void ChangeSystemAddress(RakNetGUID guid, SystemAddress systemAddress) {
SLikeNetPINVOKE.RakPeerInterface_ChangeSystemAddress(swigCPtr, RakNetGUID.getCPtr(guid), SystemAddress.getCPtr(systemAddress));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual Packet AllocatePacket(uint dataSize) {
IntPtr cPtr = SLikeNetPINVOKE.RakPeerInterface_AllocatePacket(swigCPtr, dataSize);
Packet ret = (cPtr == IntPtr.Zero) ? null : new Packet(cPtr, false);
return ret;
}
public virtual void GetSockets(SWIGTYPE_p_DataStructures__ListT_RakNetSocket2_p_t sockets) {
SLikeNetPINVOKE.RakPeerInterface_GetSockets(swigCPtr, SWIGTYPE_p_DataStructures__ListT_RakNetSocket2_p_t.getCPtr(sockets));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void WriteOutOfBandHeader(BitStream bitStream) {
SLikeNetPINVOKE.RakPeerInterface_WriteOutOfBandHeader(swigCPtr, BitStream.getCPtr(bitStream));
}
public virtual void ApplyNetworkSimulator(float packetloss, ushort minExtraPing, ushort extraPingVariance) {
SLikeNetPINVOKE.RakPeerInterface_ApplyNetworkSimulator(swigCPtr, packetloss, minExtraPing, extraPingVariance);
}
public virtual void SetPerConnectionOutgoingBandwidthLimit(uint maxBitsPerSecond) {
SLikeNetPINVOKE.RakPeerInterface_SetPerConnectionOutgoingBandwidthLimit(swigCPtr, maxBitsPerSecond);
}
public virtual bool IsNetworkSimulatorActive() {
bool ret = SLikeNetPINVOKE.RakPeerInterface_IsNetworkSimulatorActive(swigCPtr);
return ret;
}
public virtual RakNetStatistics GetStatistics(SystemAddress systemAddress, RakNetStatistics rns) {
IntPtr cPtr = SLikeNetPINVOKE.RakPeerInterface_GetStatistics__SWIG_0(swigCPtr, SystemAddress.getCPtr(systemAddress), RakNetStatistics.getCPtr(rns));
RakNetStatistics ret = (cPtr == IntPtr.Zero) ? null : new RakNetStatistics(cPtr, false);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual RakNetStatistics GetStatistics(SystemAddress systemAddress) {
IntPtr cPtr = SLikeNetPINVOKE.RakPeerInterface_GetStatistics__SWIG_1(swigCPtr, SystemAddress.getCPtr(systemAddress));
RakNetStatistics ret = (cPtr == IntPtr.Zero) ? null : new RakNetStatistics(cPtr, false);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual bool GetStatistics(uint index, RakNetStatistics rns) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_GetStatistics__SWIG_2(swigCPtr, index, RakNetStatistics.getCPtr(rns));
return ret;
}
public virtual uint GetReceiveBufferSize() {
uint ret = SLikeNetPINVOKE.RakPeerInterface_GetReceiveBufferSize(swigCPtr);
return ret;
}
public virtual bool RunUpdateCycle(BitStream updateBitStream) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_RunUpdateCycle(swigCPtr, BitStream.getCPtr(updateBitStream));
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual bool SendOutOfBand(string host, ushort remotePort, string data, uint dataLength, uint connectionSocketIndex) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_SendOutOfBand__SWIG_0(swigCPtr, host, remotePort, data, dataLength, connectionSocketIndex);
return ret;
}
public virtual bool SendOutOfBand(string host, ushort remotePort, string data, uint dataLength) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_SendOutOfBand__SWIG_1(swigCPtr, host, remotePort, data, dataLength);
return ret;
}
public uint Send(byte[] inByteArray, int length, PacketPriority priority, PacketReliability reliability, char orderingChannel, AddressOrGUID systemIdentifier, bool broadcast) {
uint ret = SLikeNetPINVOKE.RakPeerInterface_Send__SWIG_4(swigCPtr, inByteArray, length, (int)priority, (int)reliability, orderingChannel, AddressOrGUID.getCPtr(systemIdentifier), broadcast);
if (SLikeNetPINVOKE.SWIGPendingException.Pending) throw SLikeNetPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void SendLoopback(byte[] inByteArray, int length) {
SLikeNetPINVOKE.RakPeerInterface_SendLoopback__SWIG_1(swigCPtr, inByteArray, length);
}
public void SetOfflinePingResponse(byte[] inByteArray, uint length) {
SLikeNetPINVOKE.RakPeerInterface_SetOfflinePingResponse__SWIG_1(swigCPtr, inByteArray, length);
}
public bool AdvertiseSystem(string host, ushort remotePort, byte[] inByteArray, int dataLength, uint connectionSocketIndex) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_AdvertiseSystem__SWIG_2(swigCPtr, host, remotePort, inByteArray, dataLength, connectionSocketIndex);
return ret;
}
public bool AdvertiseSystem(string host, ushort remotePort, byte[] inByteArray, int dataLength) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_AdvertiseSystem__SWIG_3(swigCPtr, host, remotePort, inByteArray, dataLength);
return ret;
}
private string CSharpGetIncomingPasswordHelper(string passwordData, ref int passwordDataLength) {
string ret = SLikeNetPINVOKE.RakPeerInterface_CSharpGetIncomingPasswordHelper(swigCPtr, passwordData, ref passwordDataLength);
return ret;
}
public void SetIncomingPassword(byte[] passwordDataByteArray, int passwordDataLength) {
SLikeNetPINVOKE.RakPeerInterface_SetIncomingPassword__SWIG_1(swigCPtr, passwordDataByteArray, passwordDataLength);
}
public void GetIncomingPassword(byte[] passwordDataByteArray, ref int passwordDataLength) {
SLikeNetPINVOKE.RakPeerInterface_GetIncomingPassword(swigCPtr, passwordDataByteArray, ref passwordDataLength);
}
private void CSharpGetOfflinePingResponseHelper(byte[] inOutByteArray, out uint outLength) {
SLikeNetPINVOKE.RakPeerInterface_CSharpGetOfflinePingResponseHelper(swigCPtr, inOutByteArray, out outLength);
}
public bool GetConnectionList(RakNetListSystemAddress remoteSystems, ref ushort numberOfSystems) {
bool ret = SLikeNetPINVOKE.RakPeerInterface_GetConnectionList(swigCPtr, RakNetListSystemAddress.getCPtr(remoteSystems), ref numberOfSystems);
return ret;
}
}
}