public void PrintImage(HttpListenerContext context) { PrintImage message = ParseRequest <PrintImage>(context); if (message.Bitmap != null) { GetServer.CloverConnector.PrintImage(message.GetBitmap()); this.SendTextResponse(context, ""); } }
public void PrintImage(HttpListenerContext context) { try { PrintImage message = ParseRequest <PrintImage>(context); if (message.Bitmap != null) { GetServer.CloverConnector.PrintImage(message.GetBitmap()); this.SendTextResponse(context, ""); } } catch (Exception e) { context.Response.StatusCode = 400; context.Response.StatusDescription = e.Message; this.SendTextResponse(context, "error processing request"); } }