mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Rename *PollRequest methods to distinguish client/proxy
This commit is contained in:
parent
6e29dc676c
commit
6fd0f1ae5d
8 changed files with 12 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue