/// returns true to describe how the socket ended up connecting public static ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) { return((ESNetSocketConnectionType)0); }
// returns information about the specified socket, filling out the contents of the pointers public static bool GetSocketInfo(SNetSocket_t hSocket, out CSteamID pSteamIDRemote, out int peSocketStatus, out uint punIPRemote, out ushort punPortRemote) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamNetworking_GetSocketInfo(hSocket, out pSteamIDRemote, out peSocketStatus, out punIPRemote, out punPortRemote)); }
// max packet size, in bytes public static int GetMaxPacketSize(SNetSocket_t hSocket) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamNetworking_GetMaxPacketSize(hSocket)); }
// sending data // must be a handle to a connected socket // data is all sent via UDP, and thus send sizes are limited to 1200 bytes; after this, many routers will start dropping packets // use the reliable flag with caution; although the resend rate is pretty aggressive, // it can still cause stalls in receiving data (like TCP) public static bool SendDataOnSocket(SNetSocket_t hSocket, IntPtr pubData, uint cubData, bool bReliable) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamNetworking_SendDataOnSocket(hSocket, pubData, cubData, bReliable)); }
// checks for data from any socket that has been connected off this listen socket // returns false if there is no data remaining // fills out *pcubMsgSize with the size of the next message, in bytes // fills out *phSocket with the socket that data is available on public static bool IsDataAvailable(SNetListenSocket_t hListenSocket, out uint pcubMsgSize, out SNetSocket_t phSocket) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamNetworking_IsDataAvailable(hListenSocket, out pcubMsgSize, out phSocket)); }
internal bool GetSocketInfo(SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref uint punIPRemote, ref ushort punPortRemote) { return(_GetSocketInfo(Self, hSocket, ref pSteamIDRemote, ref peSocketStatus, ref punIPRemote, ref punPortRemote)); }
internal int GetMaxPacketSize(SNetSocket_t hSocket) { return(_GetMaxPacketSize(Self, hSocket)); }
/// <summary> /// <para> returns information about the specified socket, filling out the contents of the pointers</para> /// </summary> public static bool GetSocketInfo(SNetSocket_t hSocket, out CSteamID pSteamIDRemote, out int peSocketStatus, out uint punIPRemote, out ushort punPortRemote) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamNetworking_GetSocketInfo(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket, out pSteamIDRemote, out peSocketStatus, out punIPRemote, out punPortRemote)); }
/// <summary> /// <para> returns true to describe how the socket ended up connecting</para> /// </summary> public static ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamNetworking_GetSocketConnectionType(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket)); }
/// <summary> /// <para> checks for data from any socket that has been connected off this listen socket</para> /// <para> returns false if there is no data remaining</para> /// <para> fills out *pcubMsgSize with the size of the next message, in bytes</para> /// <para> fills out *phSocket with the socket that data is available on</para> /// </summary> public static bool IsDataAvailable(SNetListenSocket_t hListenSocket, out uint pcubMsgSize, out SNetSocket_t phSocket) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamNetworking_IsDataAvailable(CSteamGameServerAPIContext.GetSteamNetworking(), hListenSocket, out pcubMsgSize, out phSocket)); }
/// <summary> /// <para> retrieves data from any socket that has been connected off this listen socket</para> /// <para> fills in pubDest with the contents of the message</para> /// <para> messages are always complete, of the same size as was sent (i.e. packetized, not streaming)</para> /// <para> if *pcubMsgSize < cubDest, only partial data is written</para> /// <para> returns false if no data is available</para> /// <para> fills out *phSocket with the socket that data is available on</para> /// </summary> public static bool RetrieveData(SNetListenSocket_t hListenSocket, byte[] pubDest, uint cubDest, out uint pcubMsgSize, out SNetSocket_t phSocket) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamNetworking_RetrieveData(CSteamGameServerAPIContext.GetSteamNetworking(), hListenSocket, pubDest, cubDest, out pcubMsgSize, out phSocket)); }
/// <summary> /// <para> disconnects the connection to the socket, if any, and invalidates the handle</para> /// <para> any unread data on the socket will be thrown away</para> /// <para> if bNotifyRemoteEnd is set, socket will not be completely destroyed until the remote end acknowledges the disconnect</para> /// </summary> public static bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamNetworking_DestroySocket(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket, bNotifyRemoteEnd)); }
/// <summary> /// <para> sending data</para> /// <para> must be a handle to a connected socket</para> /// <para> data is all sent via UDP, and thus send sizes are limited to 1200 bytes; after this, many routers will start dropping packets</para> /// <para> use the reliable flag with caution; although the resend rate is pretty aggressive,</para> /// <para> it can still cause stalls in receiving data (like TCP)</para> /// </summary> public static bool SendDataOnSocket(SNetSocket_t hSocket, byte[] pubData, uint cubData, bool bReliable) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamGameServerNetworking_SendDataOnSocket(hSocket, pubData, cubData, bReliable)); }
/// max packet size, in bytes public static int GetMaxPacketSize(SNetSocket_t hSocket) { return(0); }
internal bool IsDataAvailable(SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket) { return(_IsDataAvailable(Self, hListenSocket, ref pcubMsgSize, ref phSocket)); }
/// <summary> /// <para> max packet size, in bytes</para> /// </summary> public static int GetMaxPacketSize(SNetSocket_t hSocket) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamNetworking_GetMaxPacketSize(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket)); }
internal bool RetrieveData(SNetListenSocket_t hListenSocket, [In, Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize, ref SNetSocket_t phSocket) { return(_RetrieveData(Self, hListenSocket, pubDest, cubDest, ref pcubMsgSize, ref phSocket)); }
/// <summary> /// <para> sending data</para> /// <para> must be a handle to a connected socket</para> /// <para> data is all sent via UDP, and thus send sizes are limited to 1200 bytes; after this, many routers will start dropping packets</para> /// <para> use the reliable flag with caution; although the resend rate is pretty aggressive,</para> /// <para> it can still cause stalls in receiving data (like TCP)</para> /// </summary> public static bool SendDataOnSocket(SNetSocket_t hSocket, byte[] pubData, uint cubData, bool bReliable) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamNetworking_SendDataOnSocket(CSteamAPIContext.GetSteamNetworking(), hSocket, pubData, cubData, bReliable)); }
internal SNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) { return(_GetSocketConnectionType(Self, hSocket)); }
/// <summary> /// <para> fills in pubDest with the contents of the message</para> /// <para> messages are always complete, of the same size as was sent (i.e. packetized, not streaming)</para> /// <para> if *pcubMsgSize < cubDest, only partial data is written</para> /// <para> returns false if no data is available</para> /// </summary> public static bool RetrieveDataFromSocket(SNetSocket_t hSocket, byte[] pubDest, uint cubDest, out uint pcubMsgSize) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamNetworking_RetrieveDataFromSocket(CSteamAPIContext.GetSteamNetworking(), hSocket, pubDest, cubDest, out pcubMsgSize)); }
/// <summary> /// <para> fills in pubDest with the contents of the message</para> /// <para> messages are always complete, of the same size as was sent (i.e. packetized, not streaming)</para> /// <para> if *pcubMsgSize < cubDest, only partial data is written</para> /// <para> returns false if no data is available</para> /// </summary> public static bool RetrieveDataFromSocket(SNetSocket_t hSocket, IntPtr pubDest, uint cubDest, out uint pcubMsgSize) { InteropHelp.TestIfAvailableGameServer(); return(NativeMethods.ISteamGameServerNetworking_RetrieveDataFromSocket(hSocket, pubDest, cubDest, out pcubMsgSize)); }
internal bool DestroySocket(SNetSocket_t hSocket, [MarshalAs(UnmanagedType.U1)] bool bNotifyRemoteEnd) { return(_DestroySocket(Self, hSocket, bNotifyRemoteEnd)); }
// receiving data // returns false if there is no data remaining // fills out *pcubMsgSize with the size of the next message, in bytes public static bool IsDataAvailableOnSocket(SNetSocket_t hSocket, out uint pcubMsgSize) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamNetworking_IsDataAvailableOnSocket(hSocket, out pcubMsgSize)); }
internal bool SendDataOnSocket(SNetSocket_t hSocket, [In, Out] IntPtr[] pubData, uint cubData, [MarshalAs(UnmanagedType.U1)] bool bReliable) { return(_SendDataOnSocket(Self, hSocket, pubData, cubData, bReliable)); }
// retrieves data from any socket that has been connected off this listen socket // fills in pubDest with the contents of the message // messages are always complete, of the same size as was sent (i.e. packetized, not streaming) // if *pcubMsgSize < cubDest, only partial data is written // returns false if no data is available // fills out *phSocket with the socket that data is available on public static bool RetrieveData(SNetListenSocket_t hListenSocket, IntPtr pubDest, uint cubDest, out uint pcubMsgSize, out SNetSocket_t phSocket) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamNetworking_RetrieveData(hListenSocket, pubDest, cubDest, out pcubMsgSize, out phSocket)); }
internal bool IsDataAvailableOnSocket(SNetSocket_t hSocket, ref uint pcubMsgSize) { return(_IsDataAvailableOnSocket(Self, hSocket, ref pcubMsgSize)); }
// returns true to describe how the socket ended up connecting public static ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamNetworking_GetSocketConnectionType(hSocket)); }
internal bool RetrieveDataFromSocket(SNetSocket_t hSocket, [In, Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize) { return(_RetrieveDataFromSocket(Self, hSocket, pubDest, cubDest, ref pcubMsgSize)); }
/// <summary> /// <para> disconnects the connection to the socket, if any, and invalidates the handle</para> /// <para> any unread data on the socket will be thrown away</para> /// <para> if bNotifyRemoteEnd is set, socket will not be completely destroyed until the remote end acknowledges the disconnect</para> /// </summary> public static bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamNetworking_DestroySocket(hSocket, bNotifyRemoteEnd)); }
/// retrieves data from any socket that has been connected off this listen socket /// fills in pubDest with the contents of the message /// messages are always complete, of the same size as was sent (i.e. packetized, not streaming) /// if *pcubMsgSize < cubDest, only partial data is written /// returns false if no data is available /// fills out *phSocket with the socket that data is available on public static bool RetrieveData(SNetListenSocket_t hListenSocket, byte[] pubDest, uint cubDest, out uint pcubMsgSize, out SNetSocket_t phSocket) { pcubMsgSize = (uint)0; phSocket = (SNetSocket_t)0; return(false); }