about summary refs log tree commit diff stats
path: root/internal/server/tcp.go
blob: 1627854f0b2b17e8e325b96ea7c17bf59d2e0de2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package server

import (
	"go.alanpearce.eu/x/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)
}