Closed camelpunch closed 8 years ago
Returning self
assumes that whenever there is a failure (e.g. EWOULDBLOCK
), an exception would be thrown. Is that the case?
https://github.com/robbiehanson/CocoaAsyncSocket is handling socket errors, and we'd receive a callback when one occurred. We have to return some sort of nullable object from write, so that the throws
Swift interop interface is generated. Swift uses a nil return to detect the presence of an error. We're doing that here: https://github.com/camelpunch/RMQClient/blob/master/RMQClient/RMQTCPSocketTransport.m#L62
At present we return an NSString *. We should return some other nullable object so the 'throws' interface is still generated for Swift. A string is just a hack.