tcpraw

package module
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: MIT Imports: 12 Imported by: 79

README

tcpraw

GoDoc MIT licensed Go Report Card

Introduction

A packet-oriented connection by simulating tcp protocol

Features

  1. Tiny, only one file.
  2. Cross-platform .
  3. Support IPv4 and IPv6.

Documentation

For complete documentation, see the associated Godoc.

Tips

sudo tcpdump -v -n -i lo0 ip and 'ip[8]>0' and tcp and port 3457

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPConn

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

TCPConn defines a TCP-packet oriented connection

func Dial

func Dial(network, address string) (*TCPConn, error)

Dial connects to the remote TCP port, and returns a single packet-oriented connection

func Listen

func Listen(network, address string) (*TCPConn, error)

Listen acts like net.ListenTCP, and returns a single packet-oriented connection

func (*TCPConn) Close

func (conn *TCPConn) Close() error

Close closes the connection.

func (*TCPConn) LocalAddr

func (conn *TCPConn) LocalAddr() net.Addr

LocalAddr returns the local network address.

func (*TCPConn) ReadFrom

func (conn *TCPConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)

ReadFrom implements the PacketConn ReadFrom method.

func (*TCPConn) SetDeadline

func (conn *TCPConn) SetDeadline(t time.Time) error

SetDeadline implements the Conn SetDeadline method.

func (*TCPConn) SetReadDeadline

func (conn *TCPConn) SetReadDeadline(t time.Time) error

SetReadDeadline implements the Conn SetReadDeadline method.

func (*TCPConn) SetWriteDeadline

func (conn *TCPConn) SetWriteDeadline(t time.Time) error

SetWriteDeadline implements the Conn SetWriteDeadline method.

func (*TCPConn) WriteTo

func (conn *TCPConn) WriteTo(p []byte, addr net.Addr) (n int, err error)

WriteTo implements the PacketConn WriteTo method.

Jump to

Keyboard shortcuts

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