![502.jpg](https://static.studygolang.com/210714/f3dec73c2c6674fbb6ed3906ccbba7e5.jpg)
要看你怎么处理请求的,如果像下面这种处理,哪么你的connChan的容量能决定一些事情,但这不是完整的,后面要扩展保证连接的事情真的做完了才从某些结构中标记完成,这样就能再接入一个请求,看个人需求吧
```go
ser.AddRouter("/hello", func(writer http.ResponseWriter, request *http.Request) {
select {
case connChan <- &Connector{request: request, writer: writer}:
log.Println(request.RemoteAddr)
default:
writer.WriteHeader(http.StatusForbidden)
writer.Write([]byte("队列已满"))
}
})
```
#2