SetContextCreater
(creater ContextCreater)
| 116 | |
| 117 | // SetContextCreater |
| 118 | func (server *HttpServer) SetContextCreater(creater ContextCreater) { |
| 119 | server.contextCreater = creater |
| 120 | server.pool.context = sync.Pool{ |
| 121 | New: func() interface{} { |
| 122 | return server.contextCreater() |
| 123 | }, |
| 124 | } |
| 125 | server.DotApp.Logger().Debug("DotWeb:HttpServer SetContextCreater()", LogTarget_HttpServer) |
| 126 | } |
| 127 | |
| 128 | // ListenAndServe listens on the TCP network address srv.Addr and then |
| 129 | // calls Serve to handle requests on incoming connections. |