Share via


IOutputChannel.Send 메서드

정의

현재 출력 채널에서 메시지를 보냅니다.

오버로드

Send(Message)

출력 채널의 대상으로 메시지를 전송합니다.

Send(Message, TimeSpan)

지정된 시간 간격 내에 현재 출력 채널에서 메시지를 보냅니다.

Send(Message)

Source:
IOutputChannel.cs
Source:
IOutputChannel.cs
Source:
IOutputChannel.cs

출력 채널의 대상으로 메시지를 전송합니다.

public:
 void Send(System::ServiceModel::Channels::Message ^ message);
public void Send (System.ServiceModel.Channels.Message message);
abstract member Send : System.ServiceModel.Channels.Message -> unit
Public Sub Send (message As Message)

매개 변수

message
Message

출력 채널에서 보낼 Message입니다.

예제

다음 코드에서는 이 메서드를 구현하는 방법을 보여 줍니다.

public IAsyncResult BeginTryReceiveRequest(TimeSpan timeout, AsyncCallback callback, object state)
{
    TryReceiveRequestAsyncResult result = new TryReceiveRequestAsyncResult(this, timeout, callback, state);
    result.Begin();
    return result;
}

설명

출력 채널에서 보내는 메시지의 대상은 채널 작성 시간에 지정됩니다.

Send 메서드는 원격 엔드포인트로의 메시지 배달을 보증하지 않습니다. IOutputChannel의 구현에서는 다양한 이유로 메시지가 자동으로 손실될 수 있습니다. 예를 들어, 추가 버퍼 공간이 없는 경우가 이에 해당됩니다. 배달 보증이 필요한 경우 IOutputSessionChannel을 사용합니다.

메시지를 출력 채널로 전달하면 메시지가 사용됩니다. Send를 호출한 후에는 더 이상 메시지를 검사하거나 메시지에서 Close를 호출할 수 없습니다.

적용 대상

Send(Message, TimeSpan)

Source:
IOutputChannel.cs
Source:
IOutputChannel.cs
Source:
IOutputChannel.cs

지정된 시간 간격 내에 현재 출력 채널에서 메시지를 보냅니다.

public:
 void Send(System::ServiceModel::Channels::Message ^ message, TimeSpan timeout);
public void Send (System.ServiceModel.Channels.Message message, TimeSpan timeout);
abstract member Send : System.ServiceModel.Channels.Message * TimeSpan -> unit
Public Sub Send (message As Message, timeout As TimeSpan)

매개 변수

message
Message

출력 채널에서 보낼 Message입니다.

timeout
TimeSpan

시간 제한이 초과되기 전에 보내기 작업이 완료되어야 하는 기간을 지정하는 TimeSpan입니다.

예제

다음 코드에서는 이 메서드를 구현하는 방법을 보여 줍니다.

public bool EndTryReceiveRequest(IAsyncResult result, out RequestContext requestContext)
{
    return TryReceiveRequestAsyncResult.End(result, out requestContext);
}

설명

출력 채널에서 보내는 메시지의 대상은 채널 작성 시간에 지정됩니다.

Send 메서드는 원격 엔드포인트로의 메시지 배달을 보증하지 않습니다. IOutputChannel의 구현에서는 다양한 이유로 메시지가 자동으로 손실될 수 있습니다. 예를 들어, 추가 버퍼 공간이 없는 경우가 이에 해당됩니다. 배달 보증이 필요한 경우 IOutputSessionChannel을 사용합니다.

메시지를 출력 채널로 전달하면 메시지가 사용됩니다. Send를 호출한 후에는 더 이상 메시지를 검사하거나 메시지에서 Close를 호출할 수 없습니다.

구현자 참고

지정된 TimeoutException이 초과된 경우 작업에서 timeout을 throw해야 합니다.

적용 대상