UdpClient.DontFragment 속성

정의

Boolean에서 IP(인터넷 프로토콜) 데이터그램의 조각화를 허용하는지 여부를 나타내는 UdpClient 값을 가져오거나 설정합니다.

public:
 property bool DontFragment { bool get(); void set(bool value); };
public bool DontFragment { get; set; }
member this.DontFragment : bool with get, set
Public Property DontFragment As Boolean

속성 값

trueUdpClient 데이터그램 조각화를 허용하지 않으면 이고, false그렇지 않으면 입니다. 기본값은 true입니다.

예외

이 속성은 InterNetwork 플래그나 InterNetworkV6 플래그를 사용하는 소켓에만 설정할 수 있습니다.

예제

다음 코드 예제에서는 DontFragment 속성입니다.

static void GetSetDontFragment( UdpClient^ u )
{
   // Set the don't fragment flag for packets emanating from
   // this client.
   u->DontFragment = true;
   Console::WriteLine(  "DontFragment value is {0}", u->DontFragment );
}
public static void GetSetDontFragment(UdpClient u)
{
    // Set the don't fragment flag for packets emanating from
    // this client.
    u.DontFragment = true;
    Console.WriteLine("DontFragment value is {0}",
        u.DontFragment);
}

설명

데이터그램은 크기가 전송 매체의 MTU(최대 전송 단위)를 초과할 때 조각화가 필요합니다. 데이터그램은 송신 호스트 또는 중간 라우터에 의해 조각화될 수 있습니다. 데이터그램을 조각화해야 하고 DontFragment 옵션이 설정되면 데이터그램이 삭제되고 ICMP(Internet Control Message Protocol) 오류 메시지가 데이터그램의 보낸 사람에게 다시 전송됩니다.

적용 대상