private HttpStatusCode Pull(HttpServerContext httpContext, bool bin) { if (bin) { httpContext.ResponseHeader["Content-Type"] = "application/octet-stream"; } else { httpContext.ResponseHeader["Content-Type"] = "application/json"; } httpContext.BeginWrite(); // var queue = httpContext.QueryString["queue"] ?? ""; var id = httpContext.QueryString["requestid"] ?? ""; // var action = new PullAction(); action.actionType = Action.PULL; action.channel = new HttpState(httpContext, bin); action.queue = queue; action.id = id; // Program.ActionProcessor.Push(action); // return(HttpStatusCode.OK); }
private void DO_Pull(PullAction action) { //add deliver to queue action.queueHandler.deliverQueue.RPush(action); // this.PushDeliver(action.queue); }
private void Pull(HttpServerWebSocketContext context, string queue, string id) { var action = new PullAction(); action.actionType = Action.PULL; action.channel = (IChannel)context.UserState; action.queue = queue; action.id = id; // Program.ActionProcessor.Push(action); }
private void Pull(PullAction action) { if (action.queueHandler == null) { action.result = "queue not exists."; action.channel.Send(action); } else { this.DO_Pull(action); } }