Example #1
0
        internal SendReadyEventArgs(ISendSocket socket)
        {
            if (socket == null)
            {
                throw new ArgumentNullException("socket");
            }

            this.Socket = socket;
        }
Example #2
0
 public NngResult <ISendAsyncContext <INngMsg> > CreateSendAsyncContext(ISendSocket socket)
 {
     return(SendAsyncContext <INngMsg> .Create(this, socket));
 }
Example #3
0
        public static NngResult <ISendAsyncContext <T> > Create(IMessageFactory <T> factory, ISendSocket socket)
        {
            var context = new SendAsyncContext <T> {
                Factory = factory, socket = socket
            };
            var res = context.InitAio();

            return(res.Into <ISendAsyncContext <T> >(context));
        }