Refactor: Add GetListener and TLS versions

This commit is contained in:
2025-01-24 19:01:12 -05:00
parent 27d7f247c3
commit 74ade60009
4 changed files with 137 additions and 48 deletions

View File

@@ -1,7 +1,9 @@
package anyhttp
import (
"context"
"encoding/json"
"log"
"testing"
"time"
)
@@ -119,6 +121,12 @@ func Test_parseAddress(t *testing.T) {
}
}
func TestServe(t *testing.T) {
ctx, err := Serve("unix?path=/tmp/foo.sock", nil)
log.Printf("Got ctx: %v\n, err: %v", ctx, err)
ctx.Shutdown(context.TODO())
}
// Helpers
// print value instead of pointer