mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Remove GetSocket interface that exposes transport details
This commit is contained in:
committed by
Dennis Klein
parent
f8824335a5
commit
ce4062f3a0
@@ -416,12 +416,7 @@ void FairMQSocketNN::Resume()
|
||||
fInterrupted = false;
|
||||
}
|
||||
|
||||
void* FairMQSocketNN::GetSocket() const
|
||||
{
|
||||
return nullptr; // dummy method to comply with the interface. functionality not possible in zeromq.
|
||||
}
|
||||
|
||||
int FairMQSocketNN::GetSocket(int /*nothing*/) const
|
||||
int FairMQSocketNN::GetSocket() const
|
||||
{
|
||||
return fSocket;
|
||||
}
|
||||
@@ -445,8 +440,7 @@ void FairMQSocketNN::SetOption(const string& option, const void* value, size_t v
|
||||
|
||||
if (option == "linger")
|
||||
{
|
||||
int val = *(static_cast<int*>(const_cast<void*>(value)));
|
||||
fLinger = val;
|
||||
fLinger = *static_cast<int*>(const_cast<void*>(value));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -459,6 +453,19 @@ void FairMQSocketNN::SetOption(const string& option, const void* value, size_t v
|
||||
|
||||
void FairMQSocketNN::GetOption(const string& option, void* value, size_t* valueSize)
|
||||
{
|
||||
if (option == "linger")
|
||||
{
|
||||
*static_cast<int*>(value) = fLinger;
|
||||
return;
|
||||
}
|
||||
|
||||
if (option == "snd-hwm" || option == "rcv-hwm")
|
||||
{
|
||||
*static_cast<int*>(value) = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int rc = nn_getsockopt(fSocket, NN_SOL_SOCKET, GetConstant(option), value, valueSize);
|
||||
if (rc < 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user