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

@ -92,7 +92,7 @@ type ProxyPollRequest struct {
Clients int
}
func EncodePollRequest(sid string, proxyType string, natType string, clients int) ([]byte, error) {
func EncodeProxyPollRequest(sid string, proxyType string, natType string, clients int) ([]byte, error) {
return json.Marshal(ProxyPollRequest{
Sid: sid,
Version: version,
@ -105,7 +105,7 @@ func EncodePollRequest(sid string, proxyType string, natType string, clients int
// Decodes a poll message from a snowflake proxy and returns the
// sid, proxy type, nat type and clients of the proxy on success
// and an error if it failed
func DecodePollRequest(data []byte) (sid string, proxyType string, natType string, clients int, err error) {
func DecodeProxyPollRequest(data []byte) (sid string, proxyType string, natType string, clients int, err error) {
var message ProxyPollRequest
err = json.Unmarshal(data, &message)