diff options
author | Vince Harron <vharron@google.com> | 2015-01-17 02:20:29 +0000 |
---|---|---|
committer | Vince Harron <vharron@google.com> | 2015-01-17 02:20:29 +0000 |
commit | eb303ee5df48c64f791f4b5ed85c055ba1d7f431 (patch) | |
tree | 342a29b93865566082438f490f63ad60639507f8 /lldb/source/Core/ConnectionMachPort.cpp | |
parent | d3e0469a843b32f9f244280a286d2465d9733e6a (diff) | |
download | bcm5719-llvm-eb303ee5df48c64f791f4b5ed85c055ba1d7f431.tar.gz bcm5719-llvm-eb303ee5df48c64f791f4b5ed85c055ba1d7f431.zip |
Added Connection::GetURI()
This function returns a URI of the resource that the connection is connected to. This is especially important for connections established by accepting a connection from a remote host.
Also added implementations for ConnectionMachPort, ConnectionSharedMemory,
Also fixed up some documentation in Connection::Write
Renamed ConnectionFileDescriptorPosix::SocketListen to ConnectionFileDescriptorPosix::SocketListenAndAccept
Fixed a log message in Socket.cpp
Differential Review: http://reviews.llvm.org/D7026
llvm-svn: 226362
Diffstat (limited to 'lldb/source/Core/ConnectionMachPort.cpp')
-rw-r--r-- | lldb/source/Core/ConnectionMachPort.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Core/ConnectionMachPort.cpp b/lldb/source/Core/ConnectionMachPort.cpp index 05ada9872b5..fe29814be42 100644 --- a/lldb/source/Core/ConnectionMachPort.cpp +++ b/lldb/source/Core/ConnectionMachPort.cpp @@ -107,6 +107,7 @@ ConnectionMachPort::Connect (const char *s, Error *error_ptr) { if (error_ptr) error_ptr->Clear(); + m_uri.assign(s); } else { @@ -209,6 +210,7 @@ ConnectionMachPort::Disconnect (Error *error_ptr) error_ptr->SetError (kret, eErrorTypeMachKernel); m_port = MACH_PORT_TYPE_NONE; } + m_uri.clear(); return eConnectionStatusSuccess; } @@ -256,6 +258,12 @@ ConnectionMachPort::Write (const void *src, size_t src_len, ConnectionStatus &st return 0; } +std::string +ConnectionMachPort::GetURI() +{ + return m_uri; +} + ConnectionStatus ConnectionMachPort::BytesAvailable (uint32_t timeout_usec, Error *error_ptr) { |