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)); }
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)); }