X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fnncp%2Fnode.go;h=ac78301f802464dae9c763de4de93495c259f748;hb=dd92823db3d72fb21a4c712a7fb052dce16443dd;hp=f1fb79ff5bdf8df4b7bca8f44bdc1eb08e3b4802;hpb=2f90b3e318395f37d0f6e713f22b9938581bcb31;p=nncp.git diff --git a/src/cypherpunks.ru/nncp/node.go b/src/cypherpunks.ru/nncp/node.go index f1fb79f..ac78301 100644 --- a/src/cypherpunks.ru/nncp/node.go +++ b/src/cypherpunks.ru/nncp/node.go @@ -1,11 +1,10 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2018 Sergey Matveev +Copyright (C) 2016-2019 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. +the Free Software Foundation, version 3 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,7 +23,6 @@ import ( "sync" "github.com/flynn/noise" - "github.com/gorhill/cronexpr" "golang.org/x/crypto/blake2b" "golang.org/x/crypto/ed25519" "golang.org/x/crypto/nacl/box" @@ -49,6 +47,8 @@ type Node struct { FreqMinSize int64 Via []*NodeId Addrs map[string]string + RxRate int + TxRate int OnlineDeadline uint MaxOnlineTime uint Calls []*Call @@ -67,15 +67,6 @@ type NodeOur struct { NoisePrv *[32]byte } -type Call struct { - Cron *cronexpr.Expression - Nice uint8 - Xx TRxTx - Addr *string - OnlineDeadline uint - MaxOnlineTime uint -} - func NewNodeGenerate() (*NodeOur, error) { exchPub, exchPrv, err := box.GenerateKey(rand.Reader) if err != nil {