network

package
v0.0.0-...-dd5a67f Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 20 Imported by: 0

README

[reference] https://gist.github.com/ole1986/d9d6be5218affd41796610a35e3b069c

traffic-control.sh 툴

  • 리눅스 시스템의 네트워크 환경을 통제 -> IoT 환경의 네트워크 상황을 시뮬레이션에 사용
  • bandwidth (e.g. 2Mbps) 및 delay (=latency=RTT/2) (e.g. 10ms)를 조절할 수 있음

sudo traffic-control.sh -o --uspeed=[BANDWIDTH] --delay=[DELAY] [TARGET_IP]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTestBlockChain

func MakeTestBlockChain(chainLength int64, partNum int64, miningInterval int, printMode bool, db xordb.Database) *core.BlockChain

make blockchain for test. insert simple blocks

func PrintMemUsage

func PrintMemUsage()

PrintMemUsage outputs the current, total and OS memory being used. As well as the number of garage collection cycles completed.

func RecvBlock

func RecvBlock(conn net.Conn) (*types.Block, error)

Get Transaction object json

func RecvLength

func RecvLength(conn net.Conn) (uint32, error)

Receive message size

func RecvObjectJson

func RecvObjectJson(conn net.Conn) ([]byte, error)

Get object json

func RecvState

func RecvState(conn net.Conn, db xordb.Database) error

func SendBlock

func SendBlock(conn net.Conn, block *types.Block) error

Send Block

func SendInterlinks(conn net.Conn, interlinks []uint64, bc *core.BlockChain) error

Send Interlinks Block

func SendMessage

func SendMessage(conn net.Conn, msg []byte) error

Send message with buffer size

func SendObject

func SendObject(conn net.Conn, v interface{}) error

Send object with handling mutex, err

func SendState

func SendState(conn net.Conn, db xordb.Database) error

Send state map

func SendTransactions

func SendTransactions(conn net.Conn, txs *types.Transactions) error

Send Transaction with Signature and txdata

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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