aboutsummaryrefslogtreecommitdiff
path: root/rpc.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-03-29 12:23:34 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-03-29 12:23:34 +0200
commit20ac254c678d769dff0bdfac7276e60b13a1ee80 (patch)
treedc8d6ceafc979645e28a929229b2dec187cbc7a1 /rpc.go
parent7a450dc19250ac3baa160db0f371aaec2f984921 (diff)
kiss
Diffstat (limited to 'rpc.go')
-rw-r--r--rpc.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/rpc.go b/rpc.go
index 194bbf0..2d843b3 100644
--- a/rpc.go
+++ b/rpc.go
@@ -1,19 +1,17 @@
package goxy
-import (
- "net/rpc"
- "sync"
-)
-
-var once sync.Once
+import "net/rpc"
type GoXY struct {
Server *Server
}
+func init() {
+ rpc.HandleHTTP()
+}
+
func Register(s *Server) {
rpc.Register(&GoXY{s})
- once.Do(rpc.HandleHTTP)
}
func DialRPC(server string) (*rpc.Client, error) {