- 博客(12)
- 资源 (2)
- 收藏
- 关注
原创 连麦介绍
多人同时上麦说话主播正常开始直播,普通观众看到主播的单人直播画面;需要连麦的观众发起连麦请求,进入连麦申请列表;主播从连麦申请列表中选择一名或多名观众进行连麦操作,主播与连麦观众进行实时音视频互动,同时互动直播系统生成“合成画面”;普通观众看到直播画面为包含主播与连麦观众的“合成画面”;为确保主播和互动观众之间能够实时互动,必
2018-02-07 16:59:09 593
原创 go json解析
JSON转换库为 encoding/json把对象转换为JSON的方法(函数)为 json.Marshal(),其函数原型如下 func Marshal(vinterface{}) ([]byte, error) 也就是说,这个函数接收任意类型的数据 v,并转换为字节数组类型,返回值就是我们想要的JSON数据和一个错误代码。当转换成功的时候,这个
2018-02-07 11:53:13 348
原创 go hmac使用
https://github.com/danharper/hmac-examples94 func generateSign(data, key []byte) string {95 mac := hmac.New(sha1.New, key)96 mac.Write(data)97 expectedMAC := mac.Sum(nil)98 return ba
2018-02-07 11:51:39 479
原创 gin入门
Download and install it:$ go get github.com/gin-gonic/ginImport it in your code:import "github.com/gin-gonic/gin"(Optional) Import net/http. This is required for example if using constants
2018-02-07 11:49:55 547
原创 go web框架推荐
https://blog.usejournal.com/top-6-web-frameworks-for-go-as-of-2017-23270e059c4bhttps://www.zhihu.com/question/27370112之前学golang的时候,看到国人写的beego框架,我就通过阅读beego代码学习go
2018-02-07 11:47:28 558
原创 Go语言入门系列2 基本语法
get download and install packages and dependenciesinstall = compile and install packages and dependenciesrun compile and run Go programbuild compile packages and dependencies
2018-02-05 19:36:55 404
原创 jrtplib编译指南
The library offers support for the Real-time Transport Protocol (RTP),The library uses the JThread library to automatically poll 轮询 for incoming data in the background, so you may want to inst
2018-02-05 11:07:55 316
原创 koa介绍
https://github.com/koajs/koahttps://github.com/demopark/koa-docs-Zh-CNctx.response.type='json';app.use()用来加载中间件app.use(ctx=> { ctx.body='Hello Koa';});
2018-02-02 14:07:02 717
原创 常用gitignore模板
作用是让临时文件和中间文件都不提交到代码库中工程相关的.gitignore 放在根目录常用 的有:Android.gitignoreC++.gitignoreC.gitignoreCMake.gitignoreCodeIgniter.gitignoreLaravel.gitignoreComposer.gitignoreGitBook.git
2018-02-02 10:22:50 6704
原创 js函数与 Promise的使用
JavaScript的函数不但是“头等公民”,而且可以像变量一样使用,具有非常强大的抽象能力。定义函数的方式如下:functionabs(x) {if (x >=0) {return x; } else {return -x; }}如果没有return语句,函数执行完毕后也会返回结果,只是结果为undefined。由于JavaSc
2018-02-02 09:40:25 567
原创 js入门介绍
为什么起名叫JavaScript?原因是当时Java语言非常红火,所以网景公司希望借Java的名气来推广,但事实上JavaScript除了语法上有点像Java,其他部分基本上没啥关系。为了让JavaScript成为全球标准,几个公司联合ECMA(European Computer Manufacturers Association)组织定制了JavaScript语言的标准,被称为ECM
2018-02-01 10:51:46 582
原创 Nginx强制使用https访问(http跳转到https)
index.htmlserver { listen 80; server_name www.starRTC.com; location / { #index.html放在虚拟主机监听的根目录下 root /www; } #将404的页面重定向到https的首页 error_page 404 h
2018-02-01 09:51:13 894
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人