-
github上你可以用别人的现成的代码 直接 git clone 即可了
-
然后你也想改代码或者贡献代码咋办?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +build linux | |
package main | |
type TransferSpeed struct{} | |
var RSpeed *TransferSpeed = NewTransferSpeed() | |
var WSpeed *TransferSpeed = NewTransferSpeed() | |
func UpdateReadIO(bytes uint32) { | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* linux 2.6.37-3.x.x x86_64, ~100 LOC | |
* gcc-4.6 -O2 semtex.c && ./a.out | |
* 2010 sd@fucksheep.org, salut! | |
* | |
* update may 2013: | |
* seems like centos 2.6.32 backported the perf bug, lol. | |
* jewgold to 115T6jzGrVMgQ2Nt1Wnua7Ch1EuL9WXT2g if you insist. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ( | |
ModeAll = iota | |
ModeRoundRobin | |
) | |
type Publisher interface { | |
Publish(string, []byte) error | |
} | |
type PublishHandler struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"fmt" | |
"io" | |
"log" | |
) |