all repos — website @ 973fa31b6743a3ea84c86ab7671349cc70a69142

My website

internal/server/tcp.go (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
package server

import (
	"go.alanpearce.eu/website/internal/listenfd"
)

func (s *Server) serveTCP() error {
	l, err := listenfd.GetListener(0, s.Addr, s.log.Named("tcp.listenfd"))
	if err != nil {
		return err
	}

	return s.Serve(l)
}