You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No matter Server or Client is triggering our middleware.go handlers, json-rpc layer is nothing but another middleware layer on raw Neptulon TCP. Due to this, we should make everything target middleware.go for incoming and sender.go for outgoing stuff.
Sender needs access to a single Conn.Write function, which could be provided as an interface during NewSender and this interface could be implemented/embedded in both Client/Server just as we did with the middleware.go
Note: Should backport this idea to Neptulon.
The text was updated successfully, but these errors were encountered:
Note: sender.go can't be exact uniform as Server will always require a ConnID to know which connection to send the message though but Client will always use the underlying client connection so won't need it.
On the other hand, at Neptulon level, sender.go can be responsible for keeping a list of connections to send the message though so can remove that function from server.go.
No matter
Server
orClient
is triggering ourmiddleware.go
handlers, json-rpc layer is nothing but another middleware layer on raw Neptulon TCP. Due to this, we should make everything targetmiddleware.go
for incoming andsender.go
for outgoing stuff.Sender needs access to a single Conn.Write function, which could be provided as an interface during NewSender and this interface could be implemented/embedded in both Client/Server just as we did with the middleware.go
Note: Should backport this idea to Neptulon.
The text was updated successfully, but these errors were encountered: