Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ReadMailReallyFast
code
Merge requests
!4
Draft: Resolve "Unix Socket Server schreiben"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Draft: Resolve "Unix Socket Server schreiben"
3-unix-socket-server-schreiben
into
master
Overview
1
Commits
15
Pipelines
25
Changes
4
Merged
Leon Dietrich
requested to merge
3-unix-socket-server-schreiben
into
master
2 years ago
Overview
1
Commits
15
Pipelines
25
Changes
4
Expand
Closes
#3 (closed)
0
0
Merge request reports
Viewing commit
bec97cbb
Prev
Next
Show latest version
4 files
+
35
−
34
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
bec97cbb
chg: Move local endpoint name retrieval to utility header
· bec97cbb
Leon Dietrich
authored
2 years ago
src/net/client_factory.cpp
+
0
−
25
Options
@@ -13,31 +13,6 @@
namespace
rmrf
::
net
{
[[
nodiscard
]]
socketaddr
get_own_address_after_connect
(
const
auto_fd
&
socket
)
{
socketaddr
own_address
;
socklen_t
sa_local_len
=
sizeof
(
sockaddr_storage
);
if
(
getsockname
(
socket
.
get
(),
own_address
.
ptr
(),
&
sa_local_len
)
==
0
)
{
// Update length field after the internal structure was modified
// TODO: Maybe make this an internal method in socketaddr to update the size
own_address
=
own_address
.
ptr
();
}
else
{
switch
(
errno
)
{
case
EBADF
:
case
ENOTSOCK
:
throw
netio_exception
(
"Invalid file descriptor provided to obtain own address. ERRNO: "
+
std
::
to_string
(
errno
));
case
EFAULT
:
case
EINVAL
:
throw
netio_exception
(
"Invlid data structure for information retrival of own socket address provided. ERRNO: "
+
std
::
to_string
(
errno
));
case
ENOBUFS
:
throw
netio_exception
(
"Kernel temporarily out of buffer space to store own address informatio.n ERRNO:."
+
std
::
to_string
(
errno
));
default:
throw
netio_exception
(
"Unexpected error while requesting own socket address. ERRNO: "
+
std
::
to_string
(
errno
));
}
}
return
own_address
;
}
[[
nodiscard
]]
std
::
unique_ptr
<
udp_client
>
client_factory_construct_udp_client
(
const
socketaddr
&
socket_identifier
,
connection_client
::
incomming_data_cb
cb
)
{
const
auto
family
=
socket_identifier
.
family
();
Loading