本文整理汇总了C#中SNetSocket_t类的典型用法代码示例。如果您正苦于以下问题:C# SNetSocket_t类的具体用法?C# SNetSocket_t怎么用?C# SNetSocket_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SNetSocket_t类属于命名空间,在下文中一共展示了SNetSocket_t类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsDataAvailableOnSocket
/// <summary>
/// <para> receiving data</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>
/// </summary>
public static bool IsDataAvailableOnSocket(SNetSocket_t hSocket, out uint pcubMsgSize) {
InteropHelp.TestIfAvailableClient();
return NativeMethods.ISteamNetworking_IsDataAvailableOnSocket(hSocket, out pcubMsgSize);
}
示例2: ISteamGameServerNetworking_GetMaxPacketSize
public static extern int ISteamGameServerNetworking_GetMaxPacketSize(SNetSocket_t hSocket);
示例3: RetrieveDataFromSocket
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);
}
示例4: GetSocketConnectionType
/// <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.ISteamGameServerNetworking_GetSocketConnectionType(hSocket);
}
示例5: RetrieveData
// 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);
}
示例6: SendDataOnSocket
/// <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);
}
示例7: RetrieveData
/// <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.ISteamGameServerNetworking_RetrieveData(hListenSocket, pubDest, cubDest, out pcubMsgSize, out phSocket);
}
示例8: ISteamGameServerNetworking_IsDataAvailableOnSocket
public static extern bool ISteamGameServerNetworking_IsDataAvailableOnSocket(SNetSocket_t hSocket, out uint pcubMsgSize);
示例9: ISteamGameServerNetworking_RetrieveDataFromSocket
public static extern bool ISteamGameServerNetworking_RetrieveDataFromSocket(SNetSocket_t hSocket, [In, Out] byte[] pubDest, uint cubDest, out uint pcubMsgSize);
示例10: ISteamGameServerNetworking_DestroySocket
public static extern bool ISteamGameServerNetworking_DestroySocket(SNetSocket_t hSocket, [MarshalAs(UnmanagedType.I1)] bool bNotifyRemoteEnd);
示例11: ISteamGameServerNetworking_SendDataOnSocket
public static extern bool ISteamGameServerNetworking_SendDataOnSocket(SNetSocket_t hSocket, [In, Out] byte[] pubData, uint cubData, [MarshalAs(UnmanagedType.I1)] bool bReliable);
示例12: ISteamNetworking_RetrieveData
public static extern bool ISteamNetworking_RetrieveData(SNetListenSocket_t hListenSocket, IntPtr pubDest, uint cubDest, out uint pcubMsgSize, out SNetSocket_t phSocket);
示例13: ISteamNetworking_RetrieveDataFromSocket
public static extern bool ISteamNetworking_RetrieveDataFromSocket(SNetSocket_t hSocket, IntPtr pubDest, uint cubDest, out uint pcubMsgSize);
示例14: ISteamNetworking_SendDataOnSocket
public static extern bool ISteamNetworking_SendDataOnSocket(SNetSocket_t hSocket, IntPtr pubData, uint cubData, [MarshalAs(UnmanagedType.I1)] bool bReliable);
示例15: RetrieveDataFromSocket
/// <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(hSocket, pubDest, cubDest, out pcubMsgSize);
}