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
1a516cf3
Commit
1a516cf3
authored
Feb 19, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/AllocatedSocketAddress: add method GetLocalRaw()
parent
5c25499c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
AllocatedSocketAddress.cxx
src/net/AllocatedSocketAddress.cxx
+8
-1
AllocatedSocketAddress.hxx
src/net/AllocatedSocketAddress.hxx
+9
-3
No files found.
src/net/AllocatedSocketAddress.cxx
View file @
1a516cf3
/*
* Copyright
(C) 2012-2017
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2012-2019
Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -29,6 +29,7 @@
#include "config.h"
#include "AllocatedSocketAddress.hxx"
#include "util/StringView.hxx"
#include <string.h>
...
...
@@ -70,6 +71,12 @@ AllocatedSocketAddress::SetSize(size_type new_size) noexcept
#ifdef HAVE_UN
StringView
AllocatedSocketAddress
::
GetLocalRaw
()
const
noexcept
{
return
SocketAddress
(
*
this
).
GetLocalRaw
();
}
void
AllocatedSocketAddress
::
SetLocal
(
const
char
*
path
)
noexcept
{
...
...
src/net/AllocatedSocketAddress.hxx
View file @
1a516cf3
/*
* Copyright
(C) 2012-2017
Max Kellermann <max.kellermann@gmail.com>
* Copyright
2012-2019
Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -27,8 +27,8 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ALLOCATED_SOCKET_ADDRESS_H
PP
#define ALLOCATED_SOCKET_ADDRESS_H
PP
#ifndef ALLOCATED_SOCKET_ADDRESS_H
XX
#define ALLOCATED_SOCKET_ADDRESS_H
XX
#include "SocketAddress.hxx"
#include "Features.hxx"
...
...
@@ -141,6 +141,12 @@ public:
#ifdef HAVE_UN
/**
* @see SocketAddress::GetLocalRaw()
*/
gcc_pure
StringView
GetLocalRaw
()
const
noexcept
;
/**
* Make this a "local" address (UNIX domain socket). If the path
* begins with a '@', then the rest specifies an "abstract" local
* address.
...
...
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