Refactor: based: Assert on int allocation for socket
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>