public NngResult <ISendReceiveAsyncContext <IMessage> > CreateSendReceiveAsyncContext(ISocket socket, SendReceiveContextSubtype subtype) { switch (subtype) { case SendReceiveContextSubtype.Bus: case SendReceiveContextSubtype.Pair: return(SendReceiveAsyncContext <IMessage> .Create(this, socket)); case SendReceiveContextSubtype.Survey: return(SurveyAsyncContext <IMessage> .Create(this, socket)); default: return(NngResult <ISendReceiveAsyncContext <IMessage> > .Err(NngErrno.EINVAL)); } }
public NngResult <ISurveyorAsyncContext <IMessage> > CreateSurveyorAsyncContext(ISocket socket) { return(SurveyAsyncContext <IMessage> .Create(this, socket)); }
public NngResult <ISurveyorAsyncContext <INngMsg> > CreateSurveyorAsyncContext(ISendRecvSocket socket) { return(SurveyAsyncContext <INngMsg> .Create(this, socket)); }