server

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

Option is a function type for configuring the Server. Option은 서버 설정을 위한 함수 타입입니다.

func WithBufferSize

func WithBufferSize(n int) Option

func WithKeepAliveTimeout

func WithKeepAliveTimeout(d time.Duration) Option

WithKeepAliveTimeout sets the Keep-Alive timeout. WithKeepAliveTimeout은 Keep-Alive 타임아웃을 설정합니다.

func WithMaxConns

func WithMaxConns(n int32) Option

WithMaxConns sets the maximum number of concurrent connections.

func WithPollerNum

func WithPollerNum(n int) Option

func WithReadTimeout

func WithReadTimeout(d time.Duration) Option

WithReadTimeout sets the read timeout. WithReadTimeout은 읽기 타임아웃을 설정합니다.

func WithWriteTimeout

func WithWriteTimeout(d time.Duration) Option

WithWriteTimeout sets the write timeout. WithWriteTimeout은 쓰기 타임아웃을 설정합니다.

type Server

type Server struct {
	Engine *engine.Engine // The request processing engine. // 요청 처리 엔진입니다.
	// contains filtered or unexported fields
}

Server is the top-level structure for the netpoll server. Server는 netpoll 서버의 최상위 구조체입니다.

func NewServer

func NewServer(e *engine.Engine, opts ...Option) *Server

NewServer creates a new Server. NewServer는 새로운 Server를 생성합니다.

func (*Server) Serve

func (s *Server) Serve(addr string) error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down the server. Shutdown은 서버를 정상적으로(gracefully) 종료합니다.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL