Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Peacoor Zomboss
miscellaneous
提交
4f74e498
M
miscellaneous
项目概览
Peacoor Zomboss
/
miscellaneous
通知
152
Star
9
Fork
18
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
2
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
miscellaneous
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
2
Issue
2
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4f74e498
编写于
2月 14, 2023
作者:
Peacoor Zomboss
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't use sock queue now
上级
493f852b
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
1 addition
and
42 deletion
+1
-42
230130-hookgamesendto/hookdll/Makefile
230130-hookgamesendto/hookdll/Makefile
+1
-1
230130-hookgamesendto/inc/sockqueue.h
230130-hookgamesendto/inc/sockqueue.h
+0
-17
230130-hookgamesendto/src/fkhook.cpp
230130-hookgamesendto/src/fkhook.cpp
+0
-1
230130-hookgamesendto/src/sockqueue.cpp
230130-hookgamesendto/src/sockqueue.cpp
+0
-23
未找到文件。
230130-hookgamesendto/hookdll/Makefile
浏览文件 @
4f74e498
...
...
@@ -6,7 +6,7 @@ cxx32prefix = i686-w64-mingw32-
cxx64prefix
=
x86_64-w64-mingw32-
objdir
=
./obj/
bindir
=
../bin/
src
=
hookdll.cpp fkhook.cpp inlinehook.cpp
sockqueue.cpp
src
=
hookdll.cpp fkhook.cpp inlinehook.cpp
obj32
=
$(
patsubst
%.cpp,
$(objdir)
%_32.o,
$(src)
)
obj64
=
$(
patsubst
%.cpp,
$(objdir)
%_64.o,
$(src)
)
target32
=
$(bindir)
hookdll32.dll
...
...
230130-hookgamesendto/inc/sockqueue.h
已删除
100644 → 0
浏览文件 @
493f852b
#pragma once
#include <winsock2.h>
#define MAX_SOCK_QUEUE 64
// Socket循环队列,使socket排队关闭而不是立即关闭
class
SockQueue
{
private:
SOCKET
socks
[
MAX_SOCK_QUEUE
];
int
current
;
public:
SockQueue
();
~
SockQueue
();
void
add
(
SOCKET
s
);
};
230130-hookgamesendto/src/fkhook.cpp
浏览文件 @
4f74e498
#include <winsock2.h>
#include "fkhook.h"
#include "sockqueue.h"
#include "platform.h"
#include <vector>
...
...
230130-hookgamesendto/src/sockqueue.cpp
已删除
100644 → 0
浏览文件 @
493f852b
#include "sockqueue.h"
SockQueue
::
SockQueue
()
{
memset
(
&
socks
,
0
,
MAX_SOCK_QUEUE
*
sizeof
(
SOCKET
));
current
=
0
;
}
SockQueue
::~
SockQueue
()
{
for
(
int
i
=
0
;
i
<
MAX_SOCK_QUEUE
;
i
++
)
if
(
socks
[
i
]
!=
0
)
closesocket
(
socks
[
i
]);
}
void
SockQueue
::
add
(
SOCKET
s
)
{
if
(
socks
[
current
]
!=
0
)
closesocket
(
socks
[
current
]);
socks
[
current
++
]
=
s
;
if
(
current
==
MAX_SOCK_QUEUE
)
current
=
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录