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
Currently opening a connection is handled in the connect() function. This could be refactored so that no explicit call to this function is needed. The commit() function would make sure that a connection is opened before the message is sent.
This would simplify using the object in other components. Now in some cases the connection has to be done in the constructor, which is bad design, but there really is no better alternative.
The text was updated successfully, but these errors were encountered:
RelpConnection would also benefit from refactoring it to be immutable. Currently the status of the connection is kept inside a variable, it should return a new RelpConnection with the updated state instead. An interface for the object would also help with unit testing in other components, where fake objects are needed.
Description
Currently opening a connection is handled in the
connect()
function. This could be refactored so that no explicit call to this function is needed. Thecommit()
function would make sure that a connection is opened before the message is sent.This would simplify using the object in other components. Now in some cases the connection has to be done in the constructor, which is bad design, but there really is no better alternative.
The text was updated successfully, but these errors were encountered: