MCPcopy
hub / github.com/txthinking/brook / NewPacketClient

Function NewPacketClient

packetclient.go:43–49  ·  view source on GitHub ↗
(password []byte, src string, server net.Conn, timeout int, dstb []byte)

Source from the content-addressed store, hash-verified

41}
42
43func NewPacketClient(password []byte, src string, server net.Conn, timeout int, dstb []byte) (Exchanger, error) {
44 s := &PacketClient{Password: password, Server: server, Timeout: timeout, src: src}
45 s.RB = x.BP65507.Get().([]byte)
46 s.WB = x.BP65507.Get().([]byte)
47 s.dstb = dstb
48 return ClientGate(s)
49}
50
51func (c *PacketClient) Exchange(local net.Conn) error {
52 go func() {

Callers 3

UDPHandleMethod · 0.85
CreateExchangerMethod · 0.85
UDPHandleMethod · 0.85

Calls 1

GetMethod · 0.80

Tested by

no test coverage detected