frp/extend/limit/w_test.go
OoyonghongoO 84d34c8298 UPLOAD
2024-10-05 10:25:11 +08:00

18 lines
275 B
Go

package limit
import (
"fmt"
"net/http"
"testing"
)
func TestHttp(t *testing.T) {
http.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) {
lw := NewWriterWithLimit(w, 10*KB)
for {
fmt.Fprintf(lw, "x")
}
})
http.ListenAndServe(":62542", nil)
}