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

Implement URLSession configuration override for URLSessionTransport #186

Merged
merged 2 commits into from
Jun 4, 2021

Conversation

bcardarella
Copy link
Contributor

This will allow configuration states to be shared between
transport instances.

This will allow configuration states to be shared between
transport instances.
```swift
let url = URL("wss://example.com/socket")
let configuration = URLSessionConfiguration.default
let transport: Transport = URLSessionTransport(url: url)
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 URLSessionTransport(url: url, configuration: configuration)

let url = URL("wss://example.com/socket")
let configuration = URLSessionConfiguration.default
let transport: Transport = URLSessionTransport(url: url)
```

- parameter url: URL to connect to
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should add the optional config

- parameter configuration: Provide your own URLSessionConfiguration. Uses `.default` if none provided

@dsrees dsrees merged commit 7635aa0 into davidstump:master Jun 4, 2021
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