net/SocketDescriptor: socketpair() is unavailable on Windows
This commit is contained in:
parent
b180604422
commit
73b15c1bee
@ -131,6 +131,8 @@ SocketDescriptor::CreateNonBlock(int domain, int type, int protocol)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
bool
|
||||
SocketDescriptor::CreateSocketPair(int domain, int type, int protocol,
|
||||
SocketDescriptor &a, SocketDescriptor &b)
|
||||
@ -168,6 +170,8 @@ SocketDescriptor::CreateSocketPairNonBlock(int domain, int type, int protocol,
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int
|
||||
SocketDescriptor::GetError()
|
||||
{
|
||||
|
@ -125,10 +125,12 @@ public:
|
||||
*/
|
||||
bool CreateNonBlock(int domain, int type, int protocol);
|
||||
|
||||
#ifndef _WIN32
|
||||
static bool CreateSocketPair(int domain, int type, int protocol,
|
||||
SocketDescriptor &a, SocketDescriptor &b);
|
||||
static bool CreateSocketPairNonBlock(int domain, int type, int protocol,
|
||||
SocketDescriptor &a, SocketDescriptor &b);
|
||||
#endif
|
||||
|
||||
int GetError();
|
||||
|
||||
|
@ -83,6 +83,7 @@ public:
|
||||
return UniqueSocketDescriptor(SocketDescriptor::AcceptNonBlock(address));
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
static bool CreateSocketPair(int domain, int type, int protocol,
|
||||
UniqueSocketDescriptor &a,
|
||||
UniqueSocketDescriptor &b) {
|
||||
@ -98,6 +99,7 @@ public:
|
||||
protocol,
|
||||
a, b);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user