例如第一次发送1,第二次发送2 ,第二次客户端接受的就是 12
public function sendMessageByUid($clientId, $message)
{
global $worker;
if(isset($worker->uidConnections))
{
Log::info('发送成功');
$connection = $worker->uidConnections;
Log::info($message);
$connection->send($message,true);
}else{
Log::info('发送失败');
}
}
$connection->send($message,true);这属于TCP粘包,如何解决粘包? http://doc.workerman.net/protocols/how-protocols.html