In Go using the standard net/rpc
functionality, I would like to determine what the IP address an inbound RPC request is coming from. The underlying http
functionality appears to provide this in the http.Request
object, but I cannot see any way of getting at that from the default RPC handler (set using rpc.HandleHTTP
).
Is there some hidden mechanism for getting at the underlying http.Request
, or do I have to do something fancier with setting up a different HTTP responder?