Created
April 19, 2018 08:33
-
-
Save OmisNomis/b965fa346523849587763ba3e2ea8110 to your computer and use it in GitHub Desktop.
Go RPC Tutorial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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