Closed
Description
We have a choice as to what type of interface we'd like to implement, with each having its pros and cons. I'd like to discuss that here.
The choices so far seem to be:
- The current master branch's event-driven approach
- What I originally proposed in Idiomatic Go implementation #1, our own interface with Send and Receive methods.
- net.Conn
- io.ReadWriteCloser
I personally support the idea of creating an interface very similar to net.TCPConn. After all, a TCP connection is conceptually very, very similar to a WebSocket. The primary advantage of this would be that once gopherjs/gopherjs#89 is resolved, WebSocket would be able to be used in the various libraries that desire a net.Conn. The disadvantage is, of course, that we're significantly straying from the underlying interface.
@shurcooL What do you think?
Metadata
Metadata
Assignees
Labels
No labels