diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-06-06 18:51:53 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-06-06 18:51:53 +0200 |
commit | a1d937fe3d26379e39c37e5328c96dcbd335efa3 (patch) | |
tree | 5dd93ff33fd889432ceec72d35dd87bee27d4ac3 /server.go | |
parent | strings in LDAP are case-insensitive (#8) (diff) | |
download | ldap-a1d937fe3d26379e39c37e5328c96dcbd335efa3.tar ldap-a1d937fe3d26379e39c37e5328c96dcbd335efa3.tar.gz ldap-a1d937fe3d26379e39c37e5328c96dcbd335efa3.tar.bz2 ldap-a1d937fe3d26379e39c37e5328c96dcbd335efa3.tar.lz ldap-a1d937fe3d26379e39c37e5328c96dcbd335efa3.tar.xz ldap-a1d937fe3d26379e39c37e5328c96dcbd335efa3.tar.zst ldap-a1d937fe3d26379e39c37e5328c96dcbd335efa3.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 } |