diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-06-06 18:30:48 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-06-06 18:30:48 +0200 |
commit | 4e98bda1ca75eee76e5c46d6afe803de9a7b331c (patch) | |
tree | 3eb8744f34e26570501f3f98ce256e29c181cf58 /server.go | |
parent | strings in LDAP are case-insensitive (#8) (diff) | |
download | ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar.gz ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar.bz2 ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar.lz ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar.xz ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar.zst ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.zip |
Diffstat (limited to '')
-rw-r--r-- | server.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 } |