Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
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
cpp-libs
libnice
Commits
16cfd73b
Commit
16cfd73b
authored
Oct 08, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nice_socket_is_reliable to the API
parent
ce5ce4d9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
0 deletions
+26
-0
socket/socket.c
socket/socket.c
+6
-0
socket/socket.h
socket/socket.h
+5
-0
socket/udp-bsd.c
socket/udp-bsd.c
+7
-0
socket/udp-turn.c
socket/udp-turn.c
+8
-0
No files found.
socket/socket.c
View file @
16cfd73b
...
...
@@ -65,6 +65,12 @@ nice_socket_send (
sock
->
send
(
sock
,
to
,
len
,
buf
);
}
NICEAPI_EXPORT
gboolean
nice_socket_is_reliable
(
NiceSocket
*
sock
)
{
return
sock
->
is_reliable
(
sock
);
}
NICEAPI_EXPORT
void
nice_socket_free
(
NiceSocket
*
sock
)
{
...
...
socket/socket.h
View file @
16cfd73b
...
...
@@ -52,6 +52,7 @@ struct _NiceSocket
gchar
*
buf
);
gboolean
(
*
send
)
(
NiceSocket
*
sock
,
const
NiceAddress
*
to
,
guint
len
,
const
gchar
*
buf
);
gboolean
(
*
is_reliable
)
(
NiceSocket
*
sock
);
void
(
*
close
)
(
NiceSocket
*
sock
);
void
*
priv
;
};
...
...
@@ -71,6 +72,10 @@ nice_socket_send (
guint
len
,
const
gchar
*
buf
);
gboolean
nice_socket_is_reliable
(
NiceSocket
*
sock
);
void
nice_socket_free
(
NiceSocket
*
sock
);
...
...
socket/udp-bsd.c
View file @
16cfd73b
...
...
@@ -115,6 +115,12 @@ socket_send (
return
sent
==
(
ssize_t
)
len
;
}
static
gboolean
socket_is_reliable
(
NiceSocket
*
sock
)
{
return
FALSE
;
}
static
void
socket_close
(
NiceSocket
*
sock
)
{
...
...
@@ -222,6 +228,7 @@ nice_udp_bsd_socket_new (NiceAddress *addr)
sock
->
fileno
=
sockfd
;
sock
->
send
=
socket_send
;
sock
->
recv
=
socket_recv
;
sock
->
is_reliable
=
socket_is_reliable
;
sock
->
close
=
socket_close
;
return
sock
;
}
socket/udp-turn.c
View file @
16cfd73b
...
...
@@ -471,6 +471,13 @@ socket_send (
return
TRUE
;
}
static
gboolean
socket_is_reliable
(
NiceSocket
*
sock
)
{
turn_priv
*
priv
=
(
turn_priv
*
)
sock
->
priv
;
return
nice_socket_is_reliable
(
priv
->
base_socket
);
}
static
void
socket_close
(
NiceSocket
*
sock
)
{
...
...
@@ -544,6 +551,7 @@ nice_udp_turn_socket_new (
sock
->
fileno
=
base_socket
->
fileno
;
sock
->
send
=
socket_send
;
sock
->
recv
=
socket_recv
;
sock
->
is_reliable
=
socket_is_reliable
;
sock
->
close
=
socket_close
;
sock
->
priv
=
(
void
*
)
priv
;
return
sock
;
...
...
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