Skip to content

Foundation: initialize CFSocket on startup #2026

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

Merged
merged 1 commit into from
Mar 29, 2019

Conversation

compnerd
Copy link
Member

Windows requires the networking subsystem (WinSock) to be initialized.
However, the user expects to be able to use the networking APIs in
Foundation without performing any one-time initialization. Furthermore,
due to the macro usage in the initialization path, it is easier to
perform the initialization in C than in Swift. CoreFoundation has a SPI
for this (__CFSocketInitializeWinSock).

@compnerd
Copy link
Member Author

@swift-ci please test

Windows requires the networking subsystem (WinSock) to be initialized.
However, the user expects to be able to use the networking APIs in
Foundation without performing any one-time initialization.  Furthermore,
due to the macro usage in the initialization path, it is easier to
perform the initialization in C than in Swift.  CoreFoundation has a SPI
for this (`__CFSocketInitializeWinSock`).
@compnerd compnerd force-pushed the prepare-to-be-networked branch from 17218cd to d6f351f Compare March 21, 2019 02:23
@compnerd
Copy link
Member Author

@swift-ci please test

1 similar comment
@spevans
Copy link
Contributor

spevans commented Mar 21, 2019

@swift-ci please test

@millenomi millenomi merged commit 44e1e4c into swiftlang:master Mar 29, 2019
@compnerd compnerd deleted the prepare-to-be-networked branch March 29, 2019 20:22
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.

3 participants