|
이 문서는 기계로 번역한 것입니다. 원본 텍스트를 보려면 포인터를 문서의 문장 위로 올리십시오. 추가 정보
|
번역
원본
|
SocketFlags 열거형
.NET Framework 4.5
이 열거형에는 멤버 값을 비트로 조합할 수 있는 FlagsAttribute 특성이 있습니다.
네임스페이스: System.Net.Sockets
어셈블리: System(System.dll)
| 멤버 이름 | 설명 | |
|---|---|---|
| None | ||
| OutOfBand | ||
| Peek | ||
| DontRoute | ||
| MaxIOVectorLength | ||
| Truncated | ||
| ControlDataTruncated | ||
| Broadcast | ||
| Multicast | ||
| Partial |
// Displays sending with a connected socket // using the overload that takes a buffer, message size, and socket flags. public static int SendReceiveTest3(Socket server) { byte[] msg = Encoding.UTF8.GetBytes("This is a test"); byte[] bytes = new byte[256]; try { // Blocks until send returns. int i = server.Send(msg, msg.Length, SocketFlags.None); Console.WriteLine("Sent {0} bytes.", i); // Get reply from the server. int byteCount = server.Receive(bytes, server.Available, SocketFlags.None); if (byteCount > 0) Console.WriteLine(Encoding.UTF8.GetString(bytes)); } catch (SocketException e) { Console.WriteLine("{0} Error code: {1}.", e.Message, e.ErrorCode); return (e.ErrorCode); } return 0; }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008(서버 코어 역할은 지원되지 않음), Windows Server 2008 R2(서버 코어 역할은 SP1 이상에서 지원, Itanium은 지원되지 않음)
.NET Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.