Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于源码的一些疑惑 #42

Open
Lincle101 opened this issue Dec 14, 2023 · 1 comment
Open

关于源码的一些疑惑 #42

Lincle101 opened this issue Dec 14, 2023 · 1 comment

Comments

@Lincle101
Copy link

zr-hebo,你好,我找了很多的抓包工具,目前最好的就是你这个抓包工具了,感谢作者的开源

我的golang水平不太高。关于源码里有一些疑惑

就是BaseQueryPiece这个结构体的Recovery()明明没有做任何事情 是怎么产生出抓包功能的呢?

PooledMysqlQueryPiece的结构体带的Recovery()函数是有具体作用

但是我从main函数入口去看 ,只有一个 nc.receiver <- model.NewBaseQueryPiece(localIPAddr, nc.listenPort, capturePacketRate) 这个明明是返回的BaseQueryPiece 所以很疑惑

@zr-hebo
Copy link
Owner

zr-hebo commented May 7, 2024

大佬好,多谢肯定。Recovery方法不进行抓包操作,它只回收共用内存。因此 BaseQueryPiece不需要实现,PooledMysqlQueryPiece实现了。listenNormal实现了抓包功能。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants