Skip to content

Instantly share code, notes, and snippets.

@OmisNomis
Created April 19, 2018 08:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OmisNomis/b965fa346523849587763ba3e2ea8110 to your computer and use it in GitHub Desktop.
Save OmisNomis/b965fa346523849587763ba3e2ea8110 to your computer and use it in GitHub Desktop.
Go RPC Tutorial
package main
import (
"log"
"net/rpc"
)
type ToDo struct {
Title, Status string
}
type EditToDo struct {
Title, NewTitle, NewStatus string
}
func main() {
// Create a TCP connection to localhost on port 1234
client, err := rpc.DialHTTP("tcp", "localhost:1234")
if err != nil {
log.Fatal("Connection error: ", err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment