Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: adds configuration parameter to allow skipVerification additional option #195

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

jagoPG
Copy link
Contributor

@jagoPG jagoPG commented Jan 18, 2024

Adds support for skipVerification additional option

@philippseith
Copy link
Owner

There is another solution for using a WebSocket without negotiation. Just use the WithConnection option and pass a *webSocketConnection. To allow this, you just need to add something like this:

func NewWebSocketConnection(ctx context.Context, connectionID string, opts websocket.DialOptions) (Connection, error) {
  ws, _, err := websocket.Dial(ctx, reqURL.String(), opts)
  if err != nil {
    return nil, err
  }
  return newWebSocketConnection(ctx, connectionId, ws), nil 
}

I would prefer that kind of solution, as there are no changes to the common code are necessary.

@jagoPG jagoPG force-pushed the feature/skipNegotiation branch from 8f5336f to 15df28c Compare January 19, 2024 09:24
@jagoPG
Copy link
Contributor Author

jagoPG commented Jan 19, 2024

Thanks, this worked for me. I changed the func signature so the internal dependencies are not exposed.

@philippseith philippseith merged commit 1033dde into philippseith:master Jan 19, 2024
4 of 5 checks passed
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