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


C# SafeSocketHandle.DangerousAddRef方法代码示例

本文整理汇总了C#中System.Net.Sockets.SafeSocketHandle.DangerousAddRef方法的典型用法代码示例。如果您正苦于以下问题:C# SafeSocketHandle.DangerousAddRef方法的具体用法?C# SafeSocketHandle.DangerousAddRef怎么用?C# SafeSocketHandle.DangerousAddRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Net.Sockets.SafeSocketHandle的用法示例。


在下文中一共展示了SafeSocketHandle.DangerousAddRef方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Poll_internal

		static bool Poll_internal (SafeSocketHandle safeHandle, SelectMode mode, int timeout, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				return Poll_internal (safeHandle.DangerousGetHandle (), mode, timeout, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例2: Blocking_internal

		static void Blocking_internal (SafeSocketHandle safeHandle, bool block, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				Blocking_internal (safeHandle.DangerousGetHandle (), block, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例3: RemoteEndPoint_internal

		static SocketAddress RemoteEndPoint_internal (SafeSocketHandle safeHandle, int family, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				return RemoteEndPoint_internal (safeHandle.DangerousGetHandle (), family, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例4: Shutdown_internal

		static void Shutdown_internal (SafeSocketHandle safeHandle, SocketShutdown how, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				Shutdown_internal (safeHandle.DangerousGetHandle (), how, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例5: Available_internal

		static int Available_internal (SafeSocketHandle safeHandle, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				return Available_internal (safeHandle.DangerousGetHandle (), out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例6: SetSocketOption_internal

		static void SetSocketOption_internal (SafeSocketHandle safeHandle, SocketOptionLevel level, SocketOptionName name, object obj_val, byte [] byte_val, int int_val, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				SetSocketOption_internal (safeHandle.DangerousGetHandle (), level, name, obj_val, byte_val, int_val, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例7: IOControl_internal

		static int IOControl_internal (SafeSocketHandle safeHandle, int ioctl_code, byte [] input, byte [] output, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				return IOControl_internal (safeHandle.DangerousGetHandle (), ioctl_code, input, output, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例8: Send_internal

		static int Send_internal (SafeSocketHandle safeHandle, WSABUF[] bufarray, SocketFlags flags, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				return Send_internal (safeHandle.DangerousGetHandle (), bufarray, flags, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例9: Disconnect_internal

		static void Disconnect_internal (SafeSocketHandle safeHandle, bool reuse, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				Disconnect_internal (safeHandle.DangerousGetHandle (), reuse, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例10: Listen_internal

		static void Listen_internal (SafeSocketHandle safeHandle, int backlog, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				Listen_internal (safeHandle.DangerousGetHandle (), backlog, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例11: Bind_internal

		private static void Bind_internal (SafeSocketHandle safeHandle, SocketAddress sa, out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				Bind_internal (safeHandle.DangerousGetHandle (), sa, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:11,代码来源:Socket.cs

示例12: GetSocketOption_arr_internal

		private static void GetSocketOption_arr_internal (SafeSocketHandle safeHandle,
			SocketOptionLevel level, SocketOptionName name, ref byte[] byte_val,
			out int error)
		{
			bool release = false;
			try {
				safeHandle.DangerousAddRef (ref release);
				GetSocketOption_arr_internal (safeHandle.DangerousGetHandle (), level, name, ref byte_val, out error);
			} finally {
				if (release)
					safeHandle.DangerousRelease ();
			}
		}
开发者ID:jamescourtney,项目名称:mono,代码行数:13,代码来源:Socket.cs


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