mirror of
https://github.com/openp2p-cn/openp2p.git
synced 2026-05-04 06:21:44 +08:00
optimize tcp and udp punch
This commit is contained in:
@@ -3,6 +3,7 @@ package openp2p
|
||||
import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"sync"
|
||||
@@ -41,6 +42,10 @@ type AppConfig struct {
|
||||
isUnderlayServer int // TODO: bool?
|
||||
}
|
||||
|
||||
func (c *AppConfig) ID() string {
|
||||
return fmt.Sprintf("%s%d", c.Protocol, c.SrcPort)
|
||||
}
|
||||
|
||||
// TODO: add loglevel, maxlogfilesize
|
||||
type Config struct {
|
||||
Network NetworkConfig `json:"network"`
|
||||
|
||||
Reference in New Issue
Block a user