Network cleanup (#6302)
authorLoïc Blot <nerzhul@users.noreply.github.com>
Thu, 24 Aug 2017 06:28:54 +0000 (08:28 +0200)
committerGitHub <noreply@github.com>
Thu, 24 Aug 2017 06:28:54 +0000 (08:28 +0200)
commitc7160cb629086df2a32c7dcf4faed4761ec4393e
tree63670a536ce95f6a3a1ce09bf2f2f65d1bec5214
parent928609c8bd9d4e6129ab244214bd5c54d000b737
Network cleanup (#6302)

* Cleanup network headers

* Move peerhandler to a specific header to reduce compilation times
* Move socket.cpp/h to network folder

* More work

* Network code cleanups

* Move socket.{cpp,h} to network folder
* Move Address object to network/address.{cpp,h}
* Move network exceptions to network/networkexceptions.h
* Client: use unique_ptr for Connection
* Server/ClientIface: use shared_ptr for Connection

* Format fixes

* Remove socket.cpp socket.h from clang-format whitelist

* Also fix NetworkPacket code style & make it under clang-format
28 files changed:
src/CMakeLists.txt
src/client.cpp
src/client.h
src/client/clientlauncher.cpp
src/clientiface.cpp
src/clientiface.h
src/httpfetch.cpp
src/main.cpp
src/network/CMakeLists.txt
src/network/address.cpp [new file with mode: 0644]
src/network/address.h [new file with mode: 0644]
src/network/clientpackethandler.cpp
src/network/connection.cpp
src/network/connection.h
src/network/networkexceptions.h [new file with mode: 0644]
src/network/networkpacket.cpp
src/network/networkpacket.h
src/network/peerhandler.h [new file with mode: 0644]
src/network/serverpackethandler.cpp
src/network/socket.cpp [new file with mode: 0644]
src/network/socket.h [new file with mode: 0644]
src/server.cpp
src/server.h
src/socket.cpp [deleted file]
src/socket.h [deleted file]
src/unittest/test_connection.cpp
src/unittest/test_socket.cpp
util/travis/clang-format-whitelist.txt