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
Chat example. #95
Comments
The call to close ensures that the writePump function will exit. |
how do i add the label? i am trying to add the label but i cant do it. this is a question btw |
Are you referring to the issue label? That can only be set by an admin. |
oh that make sense. thanks |
I have another quick question, hopefully, so when connection is upgraded from main -> h.run -> wsServe ->h.register if so when h.run() while loop is running <-h.broadcast is ran to call c.send?? what is c.send to?? i guess c.send if rom websocket library? I am tracing back the code to see how it works and how it is implemented and having little trouble with it I am sorry to throw newbie question. |
nvm I think I am very confused. almost everything that is related I/O handled in WritePump and ReadPump |
Should I assume nvm means that you figured it out? If not, what are the remaining questions? |
I have a feeling to understand this fully I have to read conn.go, client.go and server.go probably. Thank you for your answers. |
You might find this helpful: http://gary.burd.info/go-websocket-chat/ |
Yes perfect this is the content i wanted !!!! |
I have quick question why cant i create map with map[_connection]my_struct while map[_connection]bool is valid? |
I don't expect either to work because connection is not comparable. Try |
What do you mean? @.@ I did try map[*connection]my_struct by creating variable call conn_pair. |
Ultimately I am trying to create map [*connection address value] my_struct so that i can track connections this way i can create key server. |
I think I am getting trouble because my_struct has some pointer method. |
YEY I GOT IT.
this way i can call struct pointer methods too. |
in examples/chat/hub.go
by default was necessary to have close and delete?
I thought closing connection would be handled by unregister call?
I am actually trying to understand the code so I can implement my own utility.
Thank you for the support in advance.
The text was updated successfully, but these errors were encountered: