fix type check in socket()
handle OpenSSL waiting on /dev/urandom
add full socket tracking