Creates a socket host object.
authorZachary Turner <zturner@google.com>
Wed, 6 Aug 2014 18:16:26 +0000 (18:16 +0000)
committerZachary Turner <zturner@google.com>
Wed, 6 Aug 2014 18:16:26 +0000 (18:16 +0000)
commit98688922b7b3cb36a52d07b22a1783482ca76a50
tree06a5943fd63759881f33d644e9400e8111287f0d
parent413297c53d13a05353fc940cf00ae83ee7f89dbf
Creates a socket host object.

This patch moves the logic of many common socket operations into
its own class lldb_private::Socket.  It then modifies the
ConnectionFileDescriptor class, and a few users of that class,
to use this new Socket class instead of hardcoding socket logic
directly.

Finally, this patch creates a common interface called IOObject for
any objects that support reading and writing, so that endpoints
such as sockets and files can be treated the same.

Differential Revision: http://reviews.llvm.org/D4641

Reviewed by: Todd Fiala, Greg Clayton

llvm-svn: 214984
16 files changed:
lldb/include/lldb/Core/ConnectionFileDescriptor.h
lldb/include/lldb/Host/Editline.h
lldb/include/lldb/Host/File.h
lldb/include/lldb/Host/IOObject.h [new file with mode: 0644]
lldb/include/lldb/Host/Socket.h [new file with mode: 0644]
lldb/include/lldb/lldb-forward.h
lldb/lldb.xcodeproj/project.pbxproj
lldb/source/Core/ConnectionFileDescriptor.cpp
lldb/source/Host/common/CMakeLists.txt
lldb/source/Host/common/File.cpp
lldb/source/Host/common/IOObject.cpp [new file with mode: 0644]
lldb/source/Host/common/Socket.cpp [new file with mode: 0644]
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
lldb/tools/lldb-gdbserver/lldb-gdbserver.cpp
lldb/tools/lldb-platform/lldb-platform.cpp