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

Function NewPacketServer

packetserver.go:41–47  ·  view source on GitHub ↗
(password []byte, src string, client net.Conn, timeout int, dstb []byte)

Source from the content-addressed store, hash-verified

39}
40
41func NewPacketServer(password []byte, src string, client net.Conn, timeout int, dstb []byte) (Exchanger, error) {
42 s := &PacketServer{Password: password, Client: client, Timeout: timeout, src: src}
43 s.RB = x.BP65507.Get().([]byte)
44 s.WB = x.BP65507.Get().([]byte)
45 s.dstb = dstb
46 return ServerGate(s)
47}
48
49func (s *PacketServer) Exchange(remote net.Conn) error {
50 go func() {

Callers 2

ListenAndServeMethod · 0.85
ListenAndServeMethod · 0.85

Calls 1

GetMethod · 0.80

Tested by

no test coverage detected