Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I think this method ProtoClient.ConnectToWS should be overloaded #198

Open
suntianji123 opened this issue May 20, 2021 · 6 comments
Open
Labels

Comments

@suntianji123
Copy link

image

@yilinershi
Copy link

when I use pitaya-cli connect pitaya(use protobuff and websocket), it’ll be error。To fix this promble you need overwride ProtoClient.ConnectToWS

@felipejfc
Copy link
Contributor

I didn't get what you're saying. Pitaya-cli should test WS first, with and without tls and then raw TCP with and without TLS

https://github.com/topfreegames/pitaya-cli/blob/29b01080228daa063a5fab10bcad83f2f2fb74b9/helpers.go#L52-L67

@suntianji123
Copy link
Author

I didn't get what you're saying. Pitaya-cli should test WS first, with and without tls and then raw TCP with and without TLS

https://github.com/topfreegames/pitaya-cli/blob/29b01080228daa063a5fab10bcad83f2f2fb74b9/helpers.go#L52-L67

func (pc *ProtoClient) MsgChannel() chan *message.Message {
return pc.IncomingMsgChan
}
This method returns the channel of the subclass, but the subclass channel does not write the data of the parent channel into it. If the pc.waitForData() method is not called, the subclass channel will never have data

@felipejfc
Copy link
Contributor

How can I reproduce the problem?

@suntianji123
Copy link
Author

How can I reproduce the problem

You directly use protoclient.connectws to connect to the server, send data to the server, and cannot receive the data from the server

@suntianji123
Copy link
Author

like this :

How can I reproduce the problem?

like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants