Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
UERANSIM
Commits
bdf07780
Commit
bdf07780
authored
Dec 07, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IPv6 support
parent
2fe83f56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/lib/udp/server.cpp
src/lib/udp/server.cpp
+4
-3
No files found.
src/lib/udp/server.cpp
View file @
bdf07780
...
@@ -27,9 +27,10 @@ UdpServer::UdpServer(const std::string &address, uint16_t port) : sockets{}
...
@@ -27,9 +27,10 @@ UdpServer::UdpServer(const std::string &address, uint16_t port) : sockets{}
int
UdpServer
::
Receive
(
uint8_t
*
buffer
,
size_t
bufferSize
,
int
timeoutMs
,
InetAddress
&
outPeerAddress
)
const
int
UdpServer
::
Receive
(
uint8_t
*
buffer
,
size_t
bufferSize
,
int
timeoutMs
,
InetAddress
&
outPeerAddress
)
const
{
{
// Choose at random a ready socket for receiving data
auto
socket
=
Socket
::
Select
(
sockets
,
{},
timeoutMs
);
std
::
vector
<
Socket
>
ws
;
if
(
!
socket
.
hasFd
())
return
Socket
::
Select
(
sockets
,
ws
,
timeoutMs
).
receive
(
buffer
,
bufferSize
,
0
,
outPeerAddress
);
return
0
;
return
socket
.
receive
(
buffer
,
bufferSize
,
timeoutMs
,
outPeerAddress
);
}
}
void
UdpServer
::
Send
(
const
InetAddress
&
address
,
const
uint8_t
*
buffer
,
size_t
bufferSize
)
const
void
UdpServer
::
Send
(
const
InetAddress
&
address
,
const
uint8_t
*
buffer
,
size_t
bufferSize
)
const
...
...
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