Move SocketBase static functions to Socket