当前位置: 首页 > news >正文

大数据统计网站郑州哪里做网站汉狮

大数据统计网站,郑州哪里做网站汉狮,appui界面设计,网站开发风险协议今天闲着没事干#xff0c;研究了下lua#xff0c;lua是个好东西刚好前几天编译了frp位动态库所以顺便就做了个lua版本的frpc 其实这玩意也没啥用主要就是学习学习。 一、首先编译frp为动态库这个简单搭建go的环境添加几个导出函数编译就行没啥难的#xff0c;今天学习lua就…今天闲着没事干研究了下lualua是个好东西刚好前几天编译了frp位动态库所以顺便就做了个lua版本的frpc 其实这玩意也没啥用主要就是学习学习。 一、首先编译frp为动态库这个简单搭建go的环境添加几个导出函数编译就行没啥难的今天学习lua就是想用lua 调用fprc的动态库启动起来。 主要的接口 #pragma once #include string #include libfrpc.h #include lua.h using namespace std; /* * 根据配置内容启动frpc */ long long LuaStartClientByContent(const char* cfgFilePath, const char* content, const char* uid); /* * 根据配置文件启动frpc */ long long LuaStartClient(const char* cfgFilePath, const char* uid); /* * 查询frpc的状态 */ long long LuaGetClientState(const char* uid); /* * 停止frpc的状态 */ long long LuaStopClient(const char* uid); /* * 注册Frpc的一些状态变化 */ int LuaRegisterCallback(const char* scriptPath, const char* callbackFunctionName); lua调用的如下 -- 加载模块 local callback require(luafrpc) callback.LuaRegisterCallback(frpcallback.lua,callback) --这里可以是绝对路径也可以是相对路径 local ret callback.LuaStartClient(frpc.toml, 123456) print(ret)不过这里我只调用了两个接口实际可以调用上面的几个接口都是可以的具体的参考c那几个接口 以下是frpc的头文件 /* Code generated by cmd/cgo; DO NOT EDIT. *//* package github.com/fatedier/frp/cmd/frpc */#line 1 cgo-builtin-export-prolog#include stddef.h#ifndef GO_CGO_EXPORT_PROLOGUE_H #define GO_CGO_EXPORT_PROLOGUE_H#ifndef GO_CGO_GOSTRING_TYPEDEF typedef struct { const char *p; ptrdiff_t n; } _GoString_; #endif#endif/* Start of preamble from import C comments. */#line 16 main.go#include stdlib.h #include string.htypedef int (*CallBackFunc)(int, const char*,long long,const char*);static int callCallBack(CallBackFunc cb, int v, const char* s,long long len,const char* uid) {return cb(v, s,len,uid); }#line 1 cgo-generated-wrapper/* End of preamble from import C comments. *//* Start of boilerplate cgo prologue. */ #line 1 cgo-gcc-export-header-prolog#ifndef GO_CGO_PROLOGUE_H #define GO_CGO_PROLOGUE_H/* 移除原始架构检查替换为更安全的版本 */ #if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(__aarch64__) /*static assertion to make sure the file is being used on architectureat least with matching size of GoInt. */ typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*) 64 / 8 ? 1 : -1]; #else typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*) 32 / 8 ? 1 : -1]; #endiftypedef signed char GoInt8; typedef unsigned char GoUint8; typedef short GoInt16; typedef unsigned short GoUint16; typedef int GoInt32; typedef unsigned int GoUint32; typedef long long GoInt64; typedef unsigned long long GoUint64; typedef GoInt64 GoInt; typedef GoUint64 GoUint; typedef size_t GoUintptr; typedef float GoFloat32; typedef double GoFloat64;#ifdef _MSC_VER //#include complex.h //typedef float _Complex GoComplex64; //typedef double _Complex GoComplex128; #else typedef float _Complex GoComplex64; typedef double _Complex GoComplex128; #endif#ifndef GO_CGO_GOSTRING_TYPEDEF typedef _GoString_ GoString; #endif typedef void *GoMap; typedef void *GoChan; typedef struct { void *t; void *v; } GoInterface; typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;#endif/* End of boilerplate cgo prologue. */#ifdef __cplusplus extern C { #endifextern __declspec(dllexport) void RegisterCallback(CallBackFunc f); extern __declspec(dllexport) GoInt StartClientByContent(GoString cfgFilePath, GoString content, GoString uid); extern __declspec(dllexport) GoInt StartClient(GoString cfgFilePath, GoString uid); extern __declspec(dllexport) GoInt GetClientState(GoString uid); extern __declspec(dllexport) GoUint8 StopClient(GoString uid);#ifdef __cplusplus } #endif 写了这么多其实没啥用就是记录下自己学习的记录frpc实际用处直接启动官方提供的exe就ok了 最后附上链接lua版本frpc
http://www.ho-use.cn/article/10817238.html

相关文章:

  • 免费下载ppt模板网站哪个好网站建设一般用什么语言好
  • 公司网站制作专业公司企业信用公示信息网
  • 泉州百度搜索推广系统清理优化工具
  • 江西省上饶市网站建设公司wordpress 首页显示分类文章
  • 英国做电商网站手机版网页开发
  • 免费申请网站官网企业推广托管
  • 长沙河东做网站小城镇建设的网站中的主要观点
  • 网站推广渠道咨询中核二二正式员工一月多少钱
  • 李贤威wordpress建站教程手机网站模板 源码
  • 湖南seo网站设计网站网址黄页大全免费
  • 17网站一起做网店打不开南充网站建设服务
  • 现代网站制作wordpress主题出错修改主题
  • 集团网站推广网站做cdn
  • 电子商务网站建设教案品牌推广网站怎么做
  • flash cms网站源码在线编辑图片的网站有哪些
  • 乐山网站seo赣州网上房地产
  • 湛江网站建设方案报价做ppt模板网站有哪些
  • 个人介绍网站内容做购物网站用什么应用
  • 茌平企业做网站推广金顺广州外贸网站建设
  • 广州印刷网站建设wordpress 搜索框插件
  • 那家做网站好wordpress广告赚钱
  • 科站网站做网站卖东西
  • 手机怎么做销售网站淘宝网站是谁做的
  • 360浏览器打不开90设计网站手机网站制作软件下载
  • 浙江建设局网站首页新闻排版设计用什么软件
  • 东莞网站开发推荐电子商务网站建设与电子支付
  • 西安网站建设培训wordpress难
  • 为什么做网站费用贵订阅号自定义可以做链接网站不
  • 前端和做网站手机网站安装
  • 网站诊断内容公司域名注册查询