i've the following c++ function :
int Asio_Send_Pck(int iSendt,int Lsocket,char * Lbuff,int Len)
{
session* iTempSession = reinterpret_cast<session*>(Lsocket);
boost::asio::async_write(iTempSession->socket() ,
boost::asio::buffer(Lbuff, Len),
boost::bind(&session::handle_write,
iTempSession,
boost::asio::placeholders::error,
iTempSession->data,
iSendt
));
return 0;
};
But when compiling i get an Invalid arguments error on async_write , can i know where's ( are these ) this invalid argument(s) .
PS : I work with Boost Version 1.67.0 .
在第一个参数中,您有>
而不是->
,并且使第一个参数的类型为bool
(比较结果),而不是所需的类型(可能是某些流)。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.