toSocket method Null safety

Socket toSocket()

Extracts opened socket from resource handle.

If this resource handle is not a socket handle, the behavior of the returned Socket is completely unspecified. Be very careful to avoid using a handle incorrectly.

Implementation

Socket toSocket();