From a1d937fe3d26379e39c37e5328c96dcbd335efa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Thu, 6 Jun 2024 18:51:53 +0200 Subject: listen on network (ex. unix socket) --- server.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server.go') diff --git a/server.go b/server.go index 24b1e77..434412b 100644 --- a/server.go +++ b/server.go @@ -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 } -- cgit v1.2.3 From 594baefadd0633d16dbcab72faea4f4c5b0de4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Wed, 9 Oct 2024 22:16:11 +0200 Subject: change asn1-ber library --- server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server.go') diff --git a/server.go b/server.go index 434412b..5e124f5 100644 --- a/server.go +++ b/server.go @@ -8,7 +8,7 @@ import ( "strings" "sync" - "github.com/nmcclain/asn1-ber" + "4a.si/asn1-ber" ) type Binder interface { -- cgit v1.2.3