Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
73b15c1b
Commit
73b15c1b
authored
Aug 10, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/SocketDescriptor: socketpair() is unavailable on Windows
parent
b1806044
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
SocketDescriptor.cxx
src/net/SocketDescriptor.cxx
+4
-0
SocketDescriptor.hxx
src/net/SocketDescriptor.hxx
+2
-0
UniqueSocketDescriptor.hxx
src/net/UniqueSocketDescriptor.hxx
+2
-0
No files found.
src/net/SocketDescriptor.cxx
View file @
73b15c1b
...
...
@@ -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
()
{
...
...
src/net/SocketDescriptor.hxx
View file @
73b15c1b
...
...
@@ -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
();
...
...
src/net/UniqueSocketDescriptor.hxx
View file @
73b15c1b
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment