Skip to content

Instantly share code, notes, and snippets.

@notedit
Created February 12, 2012 14:33
Show Gist options
  • Save notedit/1808849 to your computer and use it in GitHub Desktop.
Save notedit/1808849 to your computer and use it in GitHub Desktop.
test_server
package main
import (
"gogobservice"
"net/rpc"
"net"
"log"
)
func main() {
rpc.Register(new(gogobservice.Arith))
l,e := net.Listen("tcp",":9000")
if e != nil {
log.Fatal("listen error:",e)
}
server := rpc.NewServer()
server.Accept(l)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment