当前位置: 首页>>代码示例>>C#>>正文


C# SNetSocket_t类代码示例

本文整理汇总了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);
		}
开发者ID:zsebastian,项目名称:Steamworks.NET,代码行数:9,代码来源:isteamnetworking.cs

示例2: ISteamGameServerNetworking_GetMaxPacketSize

		public static extern int ISteamGameServerNetworking_GetMaxPacketSize(SNetSocket_t hSocket);
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:1,代码来源:NativeMethods.cs

示例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);
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:5,代码来源:SteamGameServerNetworking.cs

示例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);
		}
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:7,代码来源:isteamgameservernetworking.cs

示例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);
		}
开发者ID:sparker,项目名称:Lemma,代码行数:10,代码来源:isteamnetworking.cs

示例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);
		}
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:11,代码来源:isteamgameservernetworking.cs

示例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 &lt; 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);
		}
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:12,代码来源:isteamgameservernetworking.cs

示例8: ISteamGameServerNetworking_IsDataAvailableOnSocket

		public static extern bool ISteamGameServerNetworking_IsDataAvailableOnSocket(SNetSocket_t hSocket, out uint pcubMsgSize);
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:1,代码来源:NativeMethods.cs

示例9: ISteamGameServerNetworking_RetrieveDataFromSocket

		public static extern bool ISteamGameServerNetworking_RetrieveDataFromSocket(SNetSocket_t hSocket, [In, Out] byte[] pubDest, uint cubDest, out uint pcubMsgSize);
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:1,代码来源:NativeMethods.cs

示例10: ISteamGameServerNetworking_DestroySocket

		public static extern bool ISteamGameServerNetworking_DestroySocket(SNetSocket_t hSocket, [MarshalAs(UnmanagedType.I1)] bool bNotifyRemoteEnd);
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:1,代码来源:NativeMethods.cs

示例11: ISteamGameServerNetworking_SendDataOnSocket

		public static extern bool ISteamGameServerNetworking_SendDataOnSocket(SNetSocket_t hSocket, [In, Out] byte[] pubData, uint cubData, [MarshalAs(UnmanagedType.I1)] bool bReliable);
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:1,代码来源:NativeMethods.cs

示例12: ISteamNetworking_RetrieveData

		public static extern bool ISteamNetworking_RetrieveData(SNetListenSocket_t hListenSocket, IntPtr pubDest, uint cubDest, out uint pcubMsgSize, out SNetSocket_t phSocket);
开发者ID:jtsadlerjr,项目名称:Steamworks.NET,代码行数:1,代码来源:NativeMethods.cs

示例13: ISteamNetworking_RetrieveDataFromSocket

		public static extern bool ISteamNetworking_RetrieveDataFromSocket(SNetSocket_t hSocket, IntPtr pubDest, uint cubDest, out uint pcubMsgSize);
开发者ID:jtsadlerjr,项目名称:Steamworks.NET,代码行数:1,代码来源:NativeMethods.cs

示例14: ISteamNetworking_SendDataOnSocket

		public static extern bool ISteamNetworking_SendDataOnSocket(SNetSocket_t hSocket, IntPtr pubData, uint cubData, [MarshalAs(UnmanagedType.I1)] bool bReliable);
开发者ID:jtsadlerjr,项目名称:Steamworks.NET,代码行数:1,代码来源:NativeMethods.cs

示例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 &lt; 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);
		}
开发者ID:zsebastian,项目名称:Steamworks.NET,代码行数:10,代码来源:isteamnetworking.cs


注:本文中的SNetSocket_t类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。