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

你好!朋友。我准备使用您的静态库开发一些小项目 #17

Open
a3396616601 opened this issue Jul 31, 2018 · 1 comment

Comments

@a3396616601
Copy link

首先介绍下我是一个新手,大约看了不少C++教程跟书籍。(3年左右的学习过程)现在正在操练动手能力。
接触网络编程大约半年多。
我准备使用iocp的时候发现c++11有些语法真的比较难理解!
但是这不影响我继续研究下去的心。
现在我有一个感觉比较吃力的地方 是不是包的地方 把包直接给用户呢 ?
然后用户提供工作线程用户自己解包,(更适合自定义数据结构传输解析)
dorecv()函数我看了好多次都没弄明白
using OnBlockCheck = std::function<OnBlockCheckResult(const char * /begin/, unsigned int /len/, unsigned int /bound/, unsigned int /blockLimit/)>;
甚至这种写法让我觉得很难理解 我知道这是函数C++11的函数指针形式,但是问题这么写我不知道怎么找出来哪里调用了。调用过程怎么样。

当务之急,请指导下在那个位置加入自定义结构 以及解析。
非常需要你的帮助。谢谢
mail [email protected]
qq 1507439798

@zsummer
Copy link
Owner

zsummer commented Jan 14, 2019

先按下函数指针还是function这样的概念, OnBlockCheck是一个类型, 使用这个类型就要有定义/实例化为某个变量的地方, 然后你全局搜索这个类型找到定义变量的位置, 然后全局搜索变量找到赋值的地方 .

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