国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

Workerman使用UDP協(xié)議,怎樣獲取客戶(hù)端IP

木衣

不使用Nginx和Apache的情況下

3471 2 0
2個(gè)回答

keytehu

難道不是 $connection->getRemoteIp(); ?

  • 暫無(wú)評(píng)論
taozywu

@木衣
?
看文檔+代碼
?
/Workerman/Connection/UdpConnection.php L79左右有的。

/**
?75? ? ? * Get remote IP.
?76? ? ? *
?77? ? ? * @return string
?78? ? ? */
?79? ? ?public function getRemoteIp()
?80? ? ?{
?81? ? ? ? ?$pos = strrpos($this->_remoteAddress, ':');
?82? ? ? ? ?if ($pos) {
?83? ? ? ? ? ? ?return trim(substr($this->_remoteAddress, 0, $pos), '[]');
?84? ? ? ? ?}
?85? ? ? ? ?return '';
?86? ? ?}
  • 暫無(wú)評(píng)論
年代過(guò)于久遠(yuǎn),無(wú)法發(fā)表回答
??