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
1df5c5a7
Commit
1df5c5a7
authored
7 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Listen: move class ClientListener to src/client/Listener.hxx
parent
52da387a
sisyphus
0.23.15-alt1
0.23.14-alt1
0.23.13-alt1
0.23.12-alt1
0.23.11-alt1
0.23.8-alt3
0.23.8-alt2
0.23.8-alt1
0.21.24-alt1.1
0.21.24-alt1
gb-sisyphus-task339776.6100
gb-sisyphus-task337393.100
gb-sisyphus-task337176.300
gb-sisyphus-task334590.100
gb-sisyphus-task333607.100
gb-sisyphus-task331543.2500
gb-sisyphus-task328663.4700
gb-sisyphus-task325064.100
gb-sisyphus-task319111.4000
gb-sisyphus-task313704.100
gb-sisyphus-task312885.100
gb-sisyphus-task308905.3200
gb-sisyphus-task305294.500
gb-sisyphus-task304007.100
gb-sisyphus-task303674.1700
gb-sisyphus-task298681.300
gb-sisyphus-task296051.1000
gb-sisyphus-task274827.100
gb-sisyphus-task269249.2000
gb-sisyphus-task266579.400
gb-sisyphus-task258132.600
gb-sisyphus-task254601.200
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
16 deletions
+74
-16
Makefile.am
Makefile.am
+1
-0
Listen.cxx
src/Listen.cxx
+1
-16
Listener.cxx
src/client/Listener.cxx
+32
-0
Listener.hxx
src/client/Listener.hxx
+40
-0
No files found.
Makefile.am
View file @
1df5c5a7
...
@@ -105,6 +105,7 @@ libmpd_a_SOURCES = \
...
@@ -105,6 +105,7 @@ libmpd_a_SOURCES = \
src/decoder/DecoderPlugin.hxx
\
src/decoder/DecoderPlugin.hxx
\
src/decoder/Bridge.cxx src/decoder/Bridge.hxx
\
src/decoder/Bridge.cxx src/decoder/Bridge.hxx
\
src/decoder/DecoderPrint.cxx src/decoder/DecoderPrint.hxx
\
src/decoder/DecoderPrint.cxx src/decoder/DecoderPrint.hxx
\
src/client/Listener.cxx src/client/Listener.hxx
\
src/client/Client.cxx src/client/Client.hxx
\
src/client/Client.cxx src/client/Client.hxx
\
src/client/ClientInternal.hxx
\
src/client/ClientInternal.hxx
\
src/client/ClientEvent.cxx
\
src/client/ClientEvent.cxx
\
...
...
This diff is collapsed.
Click to expand it.
src/Listen.cxx
View file @
1df5c5a7
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#include "config.h"
#include "config.h"
#include "Listen.hxx"
#include "Listen.hxx"
#include "client/
Client
.hxx"
#include "client/
Listener
.hxx"
#include "config/Param.hxx"
#include "config/Param.hxx"
#include "config/ConfigGlobal.hxx"
#include "config/ConfigGlobal.hxx"
#include "config/ConfigOption.hxx"
#include "config/ConfigOption.hxx"
...
@@ -43,21 +43,6 @@ static constexpr Domain listen_domain("listen");
...
@@ -43,21 +43,6 @@ static constexpr Domain listen_domain("listen");
#define DEFAULT_PORT 6600
#define DEFAULT_PORT 6600
class
ClientListener
final
:
public
ServerSocket
{
Partition
&
partition
;
public
:
ClientListener
(
EventLoop
&
_loop
,
Partition
&
_partition
)
:
ServerSocket
(
_loop
),
partition
(
_partition
)
{}
private
:
void
OnAccept
(
UniqueSocketDescriptor
fd
,
SocketAddress
address
,
int
uid
)
override
{
client_new
(
GetEventLoop
(),
partition
,
std
::
move
(
fd
),
address
,
uid
);
}
};
static
ClientListener
*
listen_socket
;
static
ClientListener
*
listen_socket
;
int
listen_port
;
int
listen_port
;
...
...
This diff is collapsed.
Click to expand it.
src/client/Listener.cxx
0 → 100644
View file @
1df5c5a7
/*
* Copyright 2003-2018 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "Listener.hxx"
#include "Client.hxx"
#include "net/UniqueSocketDescriptor.hxx"
#include "net/SocketAddress.hxx"
void
ClientListener
::
OnAccept
(
UniqueSocketDescriptor
fd
,
SocketAddress
address
,
int
uid
)
noexcept
{
client_new
(
GetEventLoop
(),
partition
,
std
::
move
(
fd
),
address
,
uid
);
}
This diff is collapsed.
Click to expand it.
src/client/Listener.hxx
0 → 100644
View file @
1df5c5a7
/*
* Copyright 2003-2018 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_CLIENT_LISTENER_HXX
#define MPD_CLIENT_LISTENER_HXX
#include "check.h"
#include "event/ServerSocket.hxx"
struct
Partition
;
class
ClientListener
final
:
public
ServerSocket
{
Partition
&
partition
;
public
:
ClientListener
(
EventLoop
&
_loop
,
Partition
&
_partition
)
:
ServerSocket
(
_loop
),
partition
(
_partition
)
{}
private
:
void
OnAccept
(
UniqueSocketDescriptor
fd
,
SocketAddress
address
,
int
uid
)
noexcept
override
;
};
#endif
This diff is collapsed.
Click to expand it.
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