njones / socketio

A Modern SocketIO library for go
MIT License
60 stars 9 forks source link

Update the SIO transport interface and dedup code #13

Closed njones closed 2 years ago

njones commented 2 years ago

Add a Transport() *Transport method to satisfy a hidden user interface that will allow users of the library to access the underlining Transport methods of any transport. This provides more flexibility in what user clients can provide through different transports. Remove the duplicate locking code in the Add(eio.Transport) method. Fix the Sockets(namespace) method to be namespace aware, there previously was no namespace check for when sending back sockets which lead to a bug when namespaces were used.