Skip to content

Should Dial return a net.Conn? #11

Closed
@mjohnson9

Description

@mjohnson9

cc @shurcooL

Pending release of gopherjs/gopherjs#89,

Should Dial return a net.Conn?

I believe the idiomatic Go way would be to follow the guidelines of net.TCPConn (& co.) in having a WebSocket(Conn) that is exported and fulfills net.Conn, but have Dial return a net.Conn and allow type-assertion if the consumer needs the low-level functionality of the WebSocket(Conn).

This refactor would, more than likely, break API compatibility.

Thoughts?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions