Skip to content

Add IWebSocket interface#7

Draft
turol wants to merge 1 commit intomasterfrom
websocket
Draft

Add IWebSocket interface#7
turol wants to merge 1 commit intomasterfrom
websocket

Conversation

@turol
Copy link

@turol turol commented Dec 13, 2021

No description provided.

Copy link
Collaborator

@dazzle-jukka dazzle-jukka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Left a couple of comments

{
public interface ISocketOptions
{
public void AddSubProtocol(string protocol);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think public is needed inside the interface 🙂

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


public class ClientWebSocketOptionsWrapper : IWebSocket.ISocketOptions
{
ClientWebSocketOptions o;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use descriptive names 🙂

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


public ClientWebSocketOptionsWrapper(ClientWebSocketOptions o_)
{
o = o_;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_ could be dropped from the parameter name, e.g. this.o = o

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


Uri uri = new Uri(url);
_webSocket = new ClientWebSocket();
if (ws != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{should be on a new line

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants