Remove GetSocket interface that exposes transport details

This commit is contained in:
Alexey Rybalchenko
2018-10-16 13:27:30 +02:00
committed by Dennis Klein
parent f8824335a5
commit ce4062f3a0
27 changed files with 59 additions and 189 deletions

View File

@@ -382,12 +382,6 @@ void* FairMQSocketZMQ::GetSocket() const
return fSocket;
}
int FairMQSocketZMQ::GetSocket(int) const
{
// dummy method to comply with the interface. functionality not possible in zeromq.
return -1;
}
void FairMQSocketZMQ::SetOption(const string& option, const void* value, size_t valueSize)
{
if (zmq_setsockopt(fSocket, GetConstant(option), value, valueSize) < 0)
@@ -414,7 +408,7 @@ void FairMQSocketZMQ::SetLinger(const int value)
int FairMQSocketZMQ::GetLinger() const
{
int value = 0;
size_t valueSize;
size_t valueSize = sizeof(value);
if (zmq_getsockopt(fSocket, ZMQ_LINGER, &value, &valueSize) < 0) {
throw SocketError(tools::ToString("failed getting ZMQ_LINGER, reason: ", zmq_strerror(errno)));
}
@@ -431,7 +425,7 @@ void FairMQSocketZMQ::SetSndBufSize(const int value)
int FairMQSocketZMQ::GetSndBufSize() const
{
int value = 0;
size_t valueSize;
size_t valueSize = sizeof(value);
if (zmq_getsockopt(fSocket, ZMQ_SNDHWM, &value, &valueSize) < 0) {
throw SocketError(tools::ToString("failed getting ZMQ_SNDHWM, reason: ", zmq_strerror(errno)));
}
@@ -448,7 +442,7 @@ void FairMQSocketZMQ::SetRcvBufSize(const int value)
int FairMQSocketZMQ::GetRcvBufSize() const
{
int value = 0;
size_t valueSize;
size_t valueSize = sizeof(value);
if (zmq_getsockopt(fSocket, ZMQ_RCVHWM, &value, &valueSize) < 0) {
throw SocketError(tools::ToString("failed getting ZMQ_RCVHWM, reason: ", zmq_strerror(errno)));
}
@@ -465,7 +459,7 @@ void FairMQSocketZMQ::SetSndKernelSize(const int value)
int FairMQSocketZMQ::GetSndKernelSize() const
{
int value = 0;
size_t valueSize;
size_t valueSize = sizeof(value);
if (zmq_getsockopt(fSocket, ZMQ_SNDBUF, &value, &valueSize) < 0) {
throw SocketError(tools::ToString("failed getting ZMQ_SNDBUF, reason: ", zmq_strerror(errno)));
}
@@ -482,7 +476,7 @@ void FairMQSocketZMQ::SetRcvKernelSize(const int value)
int FairMQSocketZMQ::GetRcvKernelSize() const
{
int value = 0;
size_t valueSize;
size_t valueSize = sizeof(value);
if (zmq_getsockopt(fSocket, ZMQ_RCVBUF, &value, &valueSize) < 0) {
throw SocketError(tools::ToString("failed getting ZMQ_RCVBUF, reason: ", zmq_strerror(errno)));
}