Skip to content

Instantly share code, notes, and snippets.

@anandkunal
Created September 17, 2014 16:41
Show Gist options
  • Save anandkunal/537c2f51786611cebec6 to your computer and use it in GitHub Desktop.
Save anandkunal/537c2f51786611cebec6 to your computer and use it in GitHub Desktop.
package main
import (
"log"
"net"
"net/rpc"
"runtime"
)
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
}
func main() {
rpc.Register(NewRPC())
l, e := net.Listen("tcp", ":9876")
if e != nil {
log.Fatal("listen error:", e)
}
rpc.Accept(l)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment