packet

package
v0.0.0-...-907879d Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Description: Author: Rodrigo Freitas Created at: Tue Apr 23 15:29:24 -03 2019

Description: Author: Rodrigo Freitas Created at: Tue Apr 23 21:22:48 -03 2019

Description: Author: Rodrigo Freitas Created at: Tue Apr 23 15:29:24 -03 2019

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet struct {
	*Request
	*Response
}

func NewPacket

func NewPacket() *Packet

NewPacket creates a new Packet object to hold the client request and its response.

func (*Packet) MarshalResponse

func (p *Packet) MarshalResponse() ([]byte, error)

func (*Packet) MarshalResponseError

func (p *Packet) MarshalResponseError(err error) []byte

func (*Packet) StillNeedsRead

func (p *Packet) StillNeedsRead(in []byte, length int) bool

func (*Packet) UnmarshalRequest

func (p *Packet) UnmarshalRequest(in []byte, length int) error

type Request

type Request struct {
	URL     *url.URL
	Version string
	Method  string
	Headers map[string][]string
	SDP     sdp.Session
	// contains filtered or unexported fields
}

type Response

type Response struct {
	StatusCode int
	StatusText string
	Headers    textproto.MIMEHeader
	Body       []byte
}

Jump to

Keyboard shortcuts

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