Rename *PollRequest methods to distinguish client/proxy

This commit is contained in:
Arlo Breault 2022-03-08 17:49:28 -05:00
parent 6e29dc676c
commit 6fd0f1ae5d
8 changed files with 12 additions and 12 deletions

View file

@ -149,7 +149,7 @@ func clientOffers(i *IPC, w http.ResponseWriter, r *http.Request) {
Offer: string(body),
NAT: r.Header.Get("Snowflake-NAT-Type"),
}
body, err = req.EncodePollRequest()
body, err = req.EncodeClientPollRequest()
if err != nil {
log.Printf("Error shimming the legacy request: %s", err.Error())
w.WriteHeader(http.StatusInternalServerError)

View file

@ -75,7 +75,7 @@ func (i *IPC) Debug(_ interface{}, response *string) error {
}
func (i *IPC) ProxyPolls(arg messages.Arg, response *[]byte) error {
sid, proxyType, natType, clients, err := messages.DecodePollRequest(arg.Body)
sid, proxyType, natType, clients, err := messages.DecodeProxyPollRequest(arg.Body)
if err != nil {
return messages.ErrBadRequest
}