basic working example of getting a peer and pubjey from server