12#include <osl/socket.hxx>
23 #include <sys/socket.h>
29BufferedStreamSocket::BufferedStreamSocket(
const osl::StreamSocket &aSocket ):
30 StreamSocket( aSocket ),
53 StreamSocket::getPeerAddr( rAddr );
59 return StreamSocket::write( pBuffer,
n );
64 static_cast<char const *
>(pBuffer),
68 static_cast<size_t>(
n), 0 );
83 ::osl::StreamSocket::close();
91 std::vector<char>::iterator aIt;
95 sal_uInt64 aLocation = aIt -
aBuffer.begin();
97 aLine = OString( &(*
aBuffer.begin()), aLocation );
100 aRead -= (aLocation + 1);
102 SAL_INFO(
"sdremote.bluetooth",
"recv line '" << aLine <<
"'" );
104 return aLine.getLength() + 1;
virtual void close() override
virtual sal_Int32 write(const void *pBuffer, sal_uInt32 n) override
Write a number of bytes.
void getPeerAddr(osl::SocketAddr &)
std::vector< char > aBuffer
BufferedStreamSocket(const osl::StreamSocket &aSocket)
Create a BufferedStreamSocket on top of an osl::StreamSocket.
virtual sal_Int32 readLine(OString &aLine) override
Blocks until a line is read.
#define SAL_INFO(area, stream)
OSQLColumns::const_iterator find(const OSQLColumns::const_iterator &first, const OSQLColumns::const_iterator &last, std::u16string_view _rVal, const ::comphelper::UStringMixEqual &_rCase)