Created
February 12, 2012 14:33
-
-
Save notedit/1808849 to your computer and use it in GitHub Desktop.
test_server
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 ( | |
"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