Ejemplo n.º 1
0
        public static NngResult <IReceiveAsyncContext <T> > Create(IMessageFactory <T> factory, IRecvSocket socket)
        {
            var context = new ResvAsyncContext <T> {
                Factory = factory, socket = socket
            };
            var res = context.InitAio();

            return(res.Into <IReceiveAsyncContext <T> >(context));
        }
Ejemplo n.º 2
0
        public static NngResult <IReceiveAsyncContext <T> > Create(IMessageFactory <T> factory, ISocket socket)
        {
            var context = new ResvAsyncContext <T> {
                Factory = factory, Socket = socket
            };
            var res = context.InitAio();

            return(NngResult <IReceiveAsyncContext <T> > .OkIfZero(res, context));
        }