Esempio n. 1
0
        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));
            }
        }
Esempio n. 2
0
 public NngResult <ISurveyorAsyncContext <IMessage> > CreateSurveyorAsyncContext(ISocket socket)
 {
     return(SurveyAsyncContext <IMessage> .Create(this, socket));
 }
Esempio n. 3
0
 public NngResult <ISurveyorAsyncContext <INngMsg> > CreateSurveyorAsyncContext(ISendRecvSocket socket)
 {
     return(SurveyAsyncContext <INngMsg> .Create(this, socket));
 }