Skip to content

Commit

Permalink
修正编译错误
Browse files Browse the repository at this point in the history
  • Loading branch information
bg5sbk committed Oct 25, 2016
1 parent 451c16f commit 870ab52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/json_toy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ func main() {
json.Register(AddReq{})
json.Register(AddRsp{})

server, err := link.Serve("tcp", "0.0.0.0:0", json, 0 /* sync send */)
server, err := link.Listen("tcp", "0.0.0.0:0", json, 0 /* sync send */)
checkErr(err)
addr := server.Listener().Addr().String()
go server.Serve(link.HandlerFunc(serverSessionLoop))

client, err := link.Connect("tcp", addr, json, 0)
client, err := link.Dial("tcp", addr, json, 0)
checkErr(err)
clientSessionLoop(client)
}
Expand Down

0 comments on commit 870ab52

Please sign in to comment.