net: move CloseSocket() from netbase to util/sock

Move `CloseSocket()` (and `NetworkErrorString()` which it uses) from
`netbase.{h,cpp}` to newly added `src/util/sock.{h,cpp}`.

This is necessary in order to use `CloseSocket()` from a newly
introduced Sock class (which will live in `src/util/sock.{h,cpp}`).
`sock.{h,cpp}` cannot depend on netbase because netbase will depend
on it.
This commit is contained in:
Vasil Dimov
2021-01-04 13:02:43 +01:00
parent aa17a44551
commit dec9b5e850
6 changed files with 86 additions and 55 deletions

View File

@@ -20,6 +20,7 @@
#include <protocol.h>
#include <random.h>
#include <scheduler.h>
#include <util/sock.h>
#include <util/strencodings.h>
#include <util/translation.h>