2 Star 1 Fork 1

吴越/spdk_oss

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
net.c 844 Bytes
一键复制 编辑 原始数据 按行查看 历史
吴越 提交于 2020-09-05 17:29 . update
#include "net_posix.h"
#include "malloc.h"
#include "string.h"
static __thread net_impl posix_net_impl = {
.type = SOCK_TYPE_POSIX,
.name = "posix",
.priority = 0,
.listen = posix_listen,
.accept = posix_accept,
.connect = posix_connect,
.getaddr = posix_getaddr,
.readv = posix_readv,
.writev = posix_writev,
.set_recvbuf = posix_set_recvbuf,
.set_sendbuf = posix_set_sendbuf,
.close = posix_close,
.group_create = posix_group_create,
.group_add_sock = posix_group_add_sock,
.group_remove_sock = posix_group_remove_sock,
.group_poll = posix_group_poll,
.group_close = posix_group_close
};
extern const net_impl *net_get_impl(int type) {
switch (type) {
case SOCK_TYPE_POSIX:
return &posix_net_impl;
default:
return NULL;
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wynebula/spdk_oss.git
git@gitee.com:wynebula/spdk_oss.git
wynebula
spdk_oss
spdk_oss
master

搜索帮助