本文整理汇总了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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}