io.sockets.secure.windows: Windows sockets are a bit confused. Make a word

to get the handle out of two different paths. Probably needs more
refactoring but this makes it work.
locals-and-roots
Doug Coleman 2016-06-02 11:07:19 -07:00
parent 05083ba503
commit c7041fe96e
1 changed files with 5 additions and 1 deletions

View File

@ -60,8 +60,12 @@ M: windows socket-handle handle>> alien-address ;
M: secure remote>handle ( addrspec -- handle )
[ addrspec>> remote>handle ] [ hostname>> ] bi <ssl-socket> ;
GENERIC: windows-socket-handle ( obj -- handle )
M: ssl-handle windows-socket-handle file>> ;
M: win32-socket windows-socket-handle ;
M: secure (get-local-address) ( handle remote -- sockaddr )
addrspec>> (get-local-address) ;
[ windows-socket-handle ] [ addrspec>> ] bi* (get-local-address) ;
M: secure parse-sockaddr addrspec>> parse-sockaddr f <secure> ;