forked from swiftlang/swift-corelibs-foundation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parity: Port, PortMessage and SocketPort
- Implement Port as a top-level abstract class, like Darwin’s. - Implement PortMessage. - Implement SocketPort, our only cross-platform port. Note that Distributed Objects is not available in s-c-f, and thus NSConnection-related functionality is not available nor implemented. A few differences with Darwin: - PortCoder is not available. Classes that ‘support coding only through a NSPortCoder’ do not conform to NSCoding in swift-corelibs-foundation. - MessagePort is not available in s-c-f. It is noted as a to-avoid API in the documentation and relies on Mach ports, which are not available everywhere. The default implementation of Port’s initializer would return a MessagePort as a factory initializer on Darwin if invoked directly; this is not the case here, and we diagnose that use. - Similarly, NSMachPort is also unavailable. - SocketPort uses a factory initializer on Darwin to return the same instance for the same remote port signature (uniquing). This is not the case in Swift. The return value of == and .isEqual(_:) will match Darwin’s behavior and return true for uniqued SocketPorts, but certain swift-corelibs-foundation uniqued SocketPorts will be different instances as reported by the === and !== operators.
- Loading branch information
Showing
8 changed files
with
1,120 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.