1 Star 0 Fork 0

d724789975 / GmSocket

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
FxMySocket.php 898 Bytes
一键复制 编辑 Web IDE 原始数据 按行查看 历史
724789975 提交于 2016-05-21 21:59 . 添加magicnum
<?php
require_once("log.php");
class FxMySocket
{
public function FxMySocket()
{
$this->m_hSocket = 0;
}
public function SetSocket($hSocket)
{
$this->m_hSocket = $hSocket;
//MyLog::dbg(__FILE__ . " " . __FUNCTION__ . " socket : " . print_r($this->m_hSocket, true));
}
public function GetSocket()
{
//MyLog::dbg(__FILE__ . " " . __FUNCTION__ . " socket : " . print_r($this->m_hSocket, true));
return $this->m_hSocket;
}
public function OnRead()
{
MyLog::crt(__FILE__ . ", " . __FUNCTION__ . ", " . __LINE__ . "error read");
assert_options(ASSERT_WARNING, 0);
}
public function OnWrite()
{
MyLog::crt(__FILE__ . ", " . __FUNCTION__ . ", " . __LINE__ . "error write");
assert_options(ASSERT_WARNING, 0);
}
public function CloseSocket()
{
FxNet::Instance()->DelSocket($this->GetSocket());
// socket_close($this->GetSocket());
}
private $m_hSocket;
}
?>
PHP
1
https://gitee.com/qq724789975/GmSocket.git
git@gitee.com:qq724789975/GmSocket.git
qq724789975
GmSocket
GmSocket
master

搜索帮助

14c37bed 8189591 565d56ea 8189591