git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/AxWin4 - Debugging quirks in ARCH=native
[tpg/acess2.git]
/
Usermode
/
Applications
/
axwin4_src
/
Server
/
CIPCChannel_AcessIPCPipe.cpp
diff --git
a/Usermode/Applications/axwin4_src/Server/CIPCChannel_AcessIPCPipe.cpp
b/Usermode/Applications/axwin4_src/Server/CIPCChannel_AcessIPCPipe.cpp
index
b222cea
..
51d88b1
100644
(file)
--- a/
Usermode/Applications/axwin4_src/Server/CIPCChannel_AcessIPCPipe.cpp
+++ b/
Usermode/Applications/axwin4_src/Server/CIPCChannel_AcessIPCPipe.cpp
@@
-51,7
+51,8
@@
void CIPCChannel_AcessIPCPipe::HandleSelect(const fd_set& rfds)
_SysDebug("ERROR - Failure to open new client on FD%i", m_fd);
}
else {
_SysDebug("ERROR - Failure to open new client on FD%i", m_fd);
}
else {
- _SysDebug("CIPCChannel_AcessIPCPipe::HandleSelect - New client on FD %i with FD%i", m_fd, newfd);
+ _SysDebug("CIPCChannel_AcessIPCPipe::HandleSelect - New client on FD %i with FD%i",
+ m_fd, newfd);
// emplace creates a new object within the list
m_clients.emplace( m_clients.end(), *this, newfd );
// emplace creates a new object within the list
m_clients.emplace( m_clients.end(), *this, newfd );
@@
-82,8
+83,7
@@
void CIPCChannel_AcessIPCPipe::HandleSelect(const fd_set& rfds)
CClient_AcessIPCPipe::CClient_AcessIPCPipe(::AxWin::IIPCChannel& channel, int fd):
CClient(channel),
CClient_AcessIPCPipe::CClient_AcessIPCPipe(::AxWin::IIPCChannel& channel, int fd):
CClient(channel),
- m_fd(fd),
- m_rxbuf(0x1000)
+ m_fd(fd)
{
}
{
}
@@
-98,17
+98,22
@@
void CClient_AcessIPCPipe::SendMessage(CSerialiser& message)
const ::std::vector<uint8_t>& data = message.Compact();
_SysDebug("CClient_AcessIPCPipe::SendMessage - %i bytes to %i", data.size(), m_fd);
const ::std::vector<uint8_t>& data = message.Compact();
_SysDebug("CClient_AcessIPCPipe::SendMessage - %i bytes to %i", data.size(), m_fd);
+ //_SysDebugHex("CClient_AcessIPCPipe::SendMessage", data.data(), data.size());
_SysWrite(m_fd, data.data(), data.size());
}
void CClient_AcessIPCPipe::HandleReceive()
{
_SysWrite(m_fd, data.data(), data.size());
}
void CClient_AcessIPCPipe::HandleReceive()
{
- size_t len = _SysRead(m_fd, &m_rxbuf[0], m_rxbuf.capacity());
+ ::std::vector<uint8_t> rxbuf(0x1000);
+ size_t len = _SysRead(m_fd, rxbuf.data(), rxbuf.capacity());
if( len == (size_t)-1 )
throw ::std::system_error(errno, ::std::system_category());
if( len == (size_t)-1 )
throw ::std::system_error(errno, ::std::system_category());
+ //_SysDebug("CClient_AcessIPCPipe::HandleReceive - Rx %i/%i bytes", len, rxbuf.capacity());
+ _SysDebugHex("CClient_AcessIPCPipe::HandleReceive", rxbuf.data(), len);
+ rxbuf.resize(len);
- CDeserialiser m
essage(len, &m_rxbuf[0]
);
- CClient::HandleMessage(
message
);
+ CDeserialiser m
sg( ::std::move(rxbuf)
);
+ CClient::HandleMessage(
msg
);
}
};
}
};
UCC
git Repository :: git.ucc.asn.au