diff options
-rw-r--r-- | go.mod | 4 | ||||
-rw-r--r-- | server.go | 8 |
2 files changed, 8 insertions, 4 deletions
@@ -1,5 +1,5 @@ -module github.com/nmcclain/ldap +module 4a.si/ldap -go 1.14 +go 1.22.3 require github.com/nmcclain/asn1-ber v0.0.0-20170104154839-2661553a0484 @@ -180,8 +180,12 @@ func (server *Server) GetStats() Stats { return *server.Stats } -func (server *Server) ListenAndServe(listenString string) error { - ln, err := net.Listen("tcp", listenString) +func (server *Server) ListenAndServe(listenString string, args ...string) error { + network := "tcp" + if (len(args) > 0) { + network = args[0] + } + ln, err := net.Listen(network, listenString) if err != nil { return err } |