transport

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpOK = "HTTP/1.1 200 OK\r\n"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LegacyPKT

type LegacyPKT struct {
	Conn          net.Conn
	ChunkedReader io.Reader
	Writer        *bufio.Writer
}

func NewLegacy

func NewLegacy(w http.ResponseWriter) (*LegacyPKT, error)

func (*LegacyPKT) Close

func (t *LegacyPKT) Close() error

func (*LegacyPKT) Drain

func (t *LegacyPKT) Drain()

func (*LegacyPKT) ReadPacket

func (t *LegacyPKT) ReadPacket() (n int, p []byte, err error)

func (*LegacyPKT) SendAccept

func (t *LegacyPKT) SendAccept(doSeed bool)

[MS-TSGU]: Terminal Services Gateway Server Protocol version 39.0 The server sends back the final status code 200 OK, and also a random entity body of limited size (100 bytes). This enables a reverse proxy to start allowing data from the RDG server to the RDG client. The RDG server does not specify an entity length in its response. It uses HTTP 1.0 semantics to send the entity body and closes the connection after the last byte is sent.

func (*LegacyPKT) WritePacket

func (t *LegacyPKT) WritePacket(b []byte) (n int, err error)

type Transport

type Transport interface {
	ReadPacket() (n int, p []byte, err error)
	WritePacket(b []byte) (n int, err error)
	Close() error
}

type WSPKT

type WSPKT struct {
	Conn *websocket.Conn
}

func NewWS

func NewWS(c *websocket.Conn) (*WSPKT, error)

func (*WSPKT) Close

func (t *WSPKT) Close() error

func (*WSPKT) ReadPacket

func (t *WSPKT) ReadPacket() (n int, b []byte, err error)

func (*WSPKT) WritePacket

func (t *WSPKT) WritePacket(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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