newtools / zsocket Goto Github PK
View Code? Open in Web Editor NEWZero-copy sockets for Linux in Golang
License: MIT License
Zero-copy sockets for Linux in Golang
License: MIT License
I'v connected to veth NICs by using 'https://github.com/newtools/zsocket/blob/master/examples/2simplebridge.go'
And iperf3 test cause "panic: message too long".
66 66
67 67
66 66
70 70
66 66
123 123
66 66
67 67
74 74
74 74
66 66
103 103
66 66
66 66
68 68
66 66
7306 7306
panic: message too long
goroutine 19 [running]:
main.main.func1(0xc00009e740, 0xc01c8a1c8a)
/root/tmp/xxx/main.go:28 +0x1dd
github.com/newtools/zsocket.(*ZSocket).Listen(0xc0000c6000, 0xc000082480, 0xc000070300, 0xc0000c6070)
/root/.go/src/github.com/newtools/zsocket/zsocket.go:307 +0x1d3
created by main.main
/root/tmp/xxx/main.go:18 +0x129
Seems like the package is still pointing at the old repo URL.
I'm sending udp packets at an extremely fast pace. On the other end I'm listening using zsocket like so:
err = zs.Listen(func(frame *nettypes.Frame, frameLen uint16, capturedLen uint16) {
ln:= frameLen
mPay, mOff := frame.MACPayload(0)
ln -= mOff
udp := nettypes.UDPPacket(mPay)
udp.Bytes()
atomic.AddUint64(&packetCount, 1)
})
if err != nil {
fmt.Printf("error:%v\n", err)
}
And after a couple seconds it crashes with "interrupted system call"
I'd love some guidance, if you may, on how to use it properly or clarification on what I'm doing wrong?
Thanks!
Do it!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.