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
b1806044
Commit
b1806044
authored
Aug 10, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/SocketDescriptor: implement SetNonBlocking() on Windows
parent
fab12ef2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
SocketDescriptor.cxx
src/net/SocketDescriptor.cxx
+11
-0
SocketDescriptor.hxx
src/net/SocketDescriptor.hxx
+2
-0
No files found.
src/net/SocketDescriptor.cxx
View file @
b1806044
...
...
@@ -181,6 +181,17 @@ SocketDescriptor::GetError()
:
errno
;
}
#ifdef _WIN32
bool
SocketDescriptor
::
SetNonBlocking
()
noexcept
{
u_long
val
=
1
;
return
ioctlsocket
(
fd
,
FIONBIO
,
&
val
)
==
0
;
}
#endif
bool
SocketDescriptor
::
SetOption
(
int
level
,
int
name
,
const
void
*
value
,
size_t
size
)
...
...
src/net/SocketDescriptor.hxx
View file @
b1806044
...
...
@@ -98,6 +98,8 @@ public:
using
FileDescriptor
::
Duplicate
;
using
FileDescriptor
::
Close
;
#else
bool
SetNonBlocking
()
noexcept
;
/**
* This method replaces FileDescriptor::Close(), using closesocket()
* on Windows. FileDescriptor::Close() is not virtual, so be
...
...
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