httpu

package
v0.0.0-...-481599e Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2015 License: BSD-3-Clause Imports: 7 Imported by: 2

Documentation

Overview

Package httpu implements a HTTP(M)U client as specified in the IETF draft "Multicast and Unicast UDP HTTP Messages".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a HTTP(M)U client instance.

func New

func New(localPort int) (*Client, error)

New creates a new HTTP(M)U client instance that will bind to "0.0.0.0:localPort" when making outgoing requests. Note that the UDP socket is re-initialized after each request to try to flush out the receive buffer.

func (*Client) Do

func (c *Client) Do(r *http.Request, timeout time.Duration, retries int) ([]*http.Response, error)

Do issues a HTTP(M)U request, and returns the response(s). This method is not threadsafe.

Jump to

Keyboard shortcuts

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