tcp

package module
v3.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

README

TCP Server

The TCP micro.Server implemtation. It's a partial implementation which strips out codecs, transports, etc but enables you to create a TCP Server that could potentially be used for some TCP based API services.

Usage

Documentation

Overview

Package tcp implements a go-micro.Server

Index

Constants

This section is empty.

Variables

View Source
var DefaultMaxMsgSize = 1024 * 8

DefaultMaxMsgSize define maximum message size that server can send or receive. Default value is 8K

Functions

func AuthTLS

func AuthTLS(t *tls.Config) server.Option

AuthTLS should be used to setup a secure authentication using TLS

func Listener

func Listener(l net.Listener) server.Option

Listener specifies the net.Listener to use instead of the default

func MaxConn

func MaxConn(n int) server.Option

MaxConn specifies maximum number of max simultaneous connections to server

func MaxMsgSize

func MaxMsgSize(s int) server.Option

MaxMsgSize set the maximum message in bytes the server can receive and send. Default maximum message size is 8K

func NewServer

func NewServer(opts ...server.Option) server.Server

Types

type Handler

type Handler interface {
	Serve(net.Conn)
}

Jump to

Keyboard shortcuts

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