Closed achan-css closed 2 years ago
this is from the formative coursework that taught us RPC calls and stuff
this is what the client would look like
func main(){ server := flag.String("server","127.0.0.1:8030","IP:port string to connect to as server") flag.Parse() fmt.Println("Server: ", *server) //TODO: connect to the RPC server and send the request(s) client, _ := rpc.Dial("tcp", *server) defer client.Close() request := stubs.Request{Message: "Hello"} response := new(stubs.Response) client.Call(stubs.PremiumReverseHandler, request, response) fmt.Println(("Responded: " + response.Message)) }
The test passes for single threaded distributed. Just go run server/server.go, and then go test -v -run=TestGol/-1 on another terminal instance
go run server/server.go
go test -v -run=TestGol/-1
this is from the formative coursework that taught us RPC calls and stuff
this is what the client would look like