Skip to content

snassr/blog-0005-tcprpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

controlled TCP RPC server example

RPC (Remote Procedure Call): Information is placed on a call stack then control flow is transferred to another part of the program.

Summary

  • Go RPC client will only talk to a Go server (using gob serilization).
  • Restrictions
    • Function must be public.
    • Two Arguments (pointer to a value for data to be received by client function, and pointer to a value to hold response returned to the client).
    • Have a return value of type error. func exFunc(&R, &W) error {}

Run

# start server
cd $GOPATH/src/github.com/snassr/blog-0003-gorpc/server && go run server.go
# run client
cd $GOPATH/src/github.com/snassr/blog-0003-gorpc/client && go run client.go

About

tcp rpc servers in go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages