network

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EstablishConnetion

func EstablishConnetion(_url string) *net.TCPConn

func GetTCPListener

func GetTCPListener(_url string) *net.TCPListener

func HandleTCPConn

func HandleTCPConn(_conn *net.TCPConn)

func HttpsProxy

func HttpsProxy(_port int)

will create a https proxy

Types

type Request

type Request struct {
	Method  string
	Path    string
	Version string
	Headers map[string]string
	Body    []byte
}

func Parse

func Parse(_data []byte) (r Request)

func (*Request) GetString

func (r *Request) GetString() string

type Respond

type Respond struct {
	Version string
	Code    int

	Headers map[string]string
	Body    []byte
}

func NewRespond

func NewRespond() *Respond

func (*Respond) GetString

func (r *Respond) GetString() string

Jump to

Keyboard shortcuts

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