tcpserver

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

---------------------------------------------------------------------------------------------

  • Copyright (c) IBAX. All rights reserved.
  • See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------

  • Copyright (c) IBAX. All rights reserved.
  • See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------

  • Copyright (c) IBAX. All rights reserved.
  • See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------

  • Copyright (c) IBAX. All rights reserved.
  • See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------

  • Copyright (c) IBAX. All rights reserved.
  • See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------

  • Copyright (c) IBAX. All rights reserved.
  • See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------

  • Copyright (c) IBAX. All rights reserved.
  • See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockCollection

func BlockCollection(request *network.GetBodiesRequest, w net.Conn) error

BlockCollection writes the body of the specified block blocksCollection and queue_parser_blocks daemons send the request through p.GetBlocks()

func Confirmation

func Confirmation(r *network.ConfirmRequest) (*network.ConfirmResponse, error)

Confirmation writes the hash of the specified block The request is sent by 'confirmations' daemon

func DecryptData

func DecryptData(binaryTx *[]byte) ([]byte, []byte, []byte, error)

DecryptData is decrypting data

func DisseminateTxs

func DisseminateTxs(rw io.ReadWriter) error

DisseminateTxs serves requests from disseminator for tx

func Disseminator

func Disseminator(rw io.ReadWriter) error

Disseminator get the list of transactions which belong to the sender from 'disseminator' daemon do not load the blocks here because here could be the chain of blocks that are loaded for a long time download the transactions here, because they are small and definitely will be downloaded in 60 sec

func HandleTCPRequest

func HandleTCPRequest(rw net.Conn)

HandleTCPRequest proceed TCP requests

func MaxBlock

func MaxBlock() (*network.MaxBlockResponse, error)

MaxBlock sends the last block ID blocksCollection daemon sends this request

func StopNetwork

func StopNetwork(req *network.StopNetworkRequest, w net.Conn) error

StopNetwork is stop network tx type

func TcpListener

func TcpListener(laddr string) error

TcpListener is listening tcp address

func UnmarshalTxPacket

func UnmarshalTxPacket(dat []byte) ([][]byte, error)

Types

type VotingRes

type VotingRes struct {
	VoteMsgInfo network.VoteMsg `json:"voteMsgInfo"`
	Err         string          `json:"err"`
}

type VotingTotal

type VotingTotal struct {
	Data          map[string]VotingRes `json:"data"`
	AgreeQuantity int64                `json:"agreeQuantity"`
	LocalAddress  string               `json:"localAddress"`
	St            int64                `json:"st"`
}

Jump to

Keyboard shortcuts

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