1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-10 11:40:30 +08:00

add 分片

This commit is contained in:
fumiama
2021-12-31 12:34:54 +08:00
parent 7a30bfb1e6
commit d108bb81b4
11 changed files with 336 additions and 147 deletions

View File

@@ -8,9 +8,16 @@ const (
ServiceNull = iota
// ServiceTunnel 管道通信服务
ServiceTunnel
// ServiceWireGold 虚拟组网服务
ServiceWireGold
)
type Service interface {
Create(peer string, srcport, destport, mtu uint16) (Service, error)
io.ReadWriteCloser
// Start 无阻塞运行
Start(srcport, destport, mtu uint16)
// Run 阻塞运行
Run(srcport, destport, mtu uint16)
// Stop 停止
Stop()
io.ReadWriter
}