ferdinandhubbard981 / GameOfLife-Distributed

Other
0 stars 0 forks source link

Finished Step 1 #1

Closed achan-css closed 2 years ago

achan-css commented 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))
}
achan-css commented 2 years ago

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