what is the relation between
code.google.com/p/go.net/websocket
github.com/garyburd/go-websocket/websocket
github.com/garyburd/twister/websocket
can we make whatever changes are necessary to the one in the subrepo so that we can standardize on one?
> What changes are you willing to make? Are you willing to make incompatible changes to the API or drop support for old versions of the protocol?I'd like to hear from ukai, but speaking just for me:If there are good reasons to change the API, then sure, I am willing to make incompatible changes.If there are good reasons to drop the old versions and not much harm, then sure, we can do that too.This is one of the nice things about being in a subrepo.
Russ
Can you outline the concrete changes you'd suggest in the go.net one?
I think that my package is the better starting point for the "one" websocket package. My package meets a broader set of requirements, has simpler code and passes third party protocol compliance tests. I am willing to donate my code to the Go project.
I agree with agl and second on all points.
> --
>
> ---
> You received this message because you are subscribed to a topic in the Google Groups "golang-dev" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-dev/646BVRh6s44/unsubscribe.
>
> To unsubscribe from this group and all its topics, send an email to golang-dev+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
I mean adg sorry Andrew.
My biggest issue with go.net/websocket is that its websocket.Conn is an io.ReadWriter, but websocket connections are message-based, not a stream. Using the websocket.Conn with types that expect typical io.ReadWriter semantics may cause messages to arrive at the client in fragments.On 5 June 2013 01:09, Gary Burd <gary...@gmail.com> wrote:
I think that my package is the better starting point for the "one" websocket package. My package meets a broader set of requirements, has simpler code and passes third party protocol compliance tests. I am willing to donate my code to the Go project.
My initial attempt to websocket package was somehow message oriented API, but Russ suggested to follow Read/Write API commonly used in go.
Maybe, we might want some common message oriented API? (for udp or so)
On 2 December 2013 13:47, Fumitoshi Ukai (鵜飼文敏) <uk...@google.com> wrote:
My initial attempt to websocket package was somehow message oriented API, but Russ suggested to follow Read/Write API commonly used in go.I remember that discussion. It did seem like the right move at the time. But, in retrospect, IMO it's not the right fit.
Maybe, we might want some common message oriented API? (for udp or so)Maybe. I'd rather experiment with what we have now, then for something more broadly useful later.The garyburd/go-websocket interface:
func (c *Conn) NextReader() (messageType int, r io.Reader, err error)
func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error)
is not general purpose, as it includes the messageType result/argument. I don't think such a thing is useful in the UDP protocol.
Andrew
Reader/Writer may not be the right fit, but I think you still need to have a story for why someone can't send a 4GB wire message and DoS your server. It might be just a max that the user has to set (or override) on a connection.
How about drop messageType from here, and get/set it via Reader or Write with type assertion to websocket specific interface?or make messageType for some type? for udp, we could use that for accessing peer address.
Reader/Writer may not be the right fit, but I think you still need to have a story for why someone can't send a 4GB wire message and DoS your server. It might be just a max that the user has to set (or override) on a connection.
Russ
If gorilla/websocket works well with older websocket protocol versions (like go.net/websocket does) then I am in favor of using gorilla/websocket.
It would be cool if we could some how abstract websocket.Conn so that we can connect to a appengine channel using the websocket api. Currently there isnt a way to connect a channel between a go appengine server and a native client developed in Go. Currently there is only a JS client for us to connect to.
@Andrew: nothing but a subjective bias on my part. To the extent possible, I try to stick with standard distributions. go.net/websocket, even though it is still not part of the standard (go) library, it is shipped along with v1.2 but under $GOROOT/pkg/src/code.google.com/p/go.net/websocket.
@minux: my apologies, I still don't know how it go into my $GOROOT. The original tar.gz of v1.2 binaries doesn't have it