具体的,就是
client c;
void on_message ((type) hdl, (type) msg) {
}
signed wsClientMain ( ) {
......
c.set_message_handler(bind(&on_message, ::_1, ::_2));
......
c.run( );
}
LRESULT CALLBACK WndProc ( params ) {
define variables;
......
wsClientMain ( );
......
}
on_message 的参数我动过了,具体是在 bind 里和函数本体里都加了相同的变量,编译失败。
不考虑也不采纳全局变量。