Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeadlineListener ¶
DeadlineListener is a listener that allows to set a deadline
type Handler ¶
type Handler interface { // Handle is called whenever a new connection is accepted. Handle(ctx context.Context, conn net.Conn) // Quit is being called when the server received a quit signal. Quit() error }
Handler is a interface that needs to be implemented in order to react on the requests that Server is getting.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a generic server implementation that listens on a certain port and starts a new go routine for each new accepted connection. Whatever the goroutine does is defined by the user-defined handler.
Click to show internal directories.
Click to hide internal directories.