mirror of
https://github.com/inthehand/32feet.git
synced 2026-10-19 15:20:11 +08:00
21 lines
427 B
C#
21 lines
427 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace System.Net.Sockets
|
|
{
|
|
public static class SocketAddressExtensions
|
|
{
|
|
public static byte[] ToByteArray(this SocketAddress sa)
|
|
{
|
|
byte[] array = new byte[sa.Size];
|
|
for(int i = 0; i < sa.Size;i++)
|
|
{
|
|
array[i] = sa[i];
|
|
}
|
|
|
|
return array;
|
|
}
|
|
}
|
|
}
|