core: v2ray.com/core/testing/servers/tcp Index | Files

package tcp

import "v2ray.com/core/testing/servers/tcp"

Index

Package Files

port.go tcp.go

func PickPort Uses

func PickPort() net.Port

PickPort returns an unused TCP port in the system. The port returned is highly likely to be unused, but not guaranteed.

type Server Uses

type Server struct {
    Port         net.Port
    MsgProcessor func(msg []byte) []byte
    ShouldClose  bool
    SendFirst    []byte
    Listen       net.Address
    // contains filtered or unexported fields
}

func (*Server) Close Uses

func (server *Server) Close() error

func (*Server) Start Uses

func (server *Server) Start() (net.Destination, error)

func (*Server) StartContext Uses

func (server *Server) StartContext(ctx context.Context, sockopt *internet.SocketConfig) (net.Destination, error)

Package tcp imports 9 packages (graph). Updated 2019-03-30. Refresh now. Tools for package owners.