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
6ad5b7c6
Commit
6ad5b7c6
authored
Oct 07, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port agent tests to the new NiceSocket API
parent
35192613
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
10 deletions
+4
-10
agent/test-mainloop.c
agent/test-mainloop.c
+1
-3
agent/test-poll.c
agent/test-poll.c
+2
-3
agent/test-recv.c
agent/test-recv.c
+1
-4
No files found.
agent/test-mainloop.c
View file @
6ad5b7c6
...
...
@@ -86,15 +86,13 @@ main (void)
g_main_loop_get_context
(
loop
),
recv_cb
,
GUINT_TO_POINTER
(
42
));
{
NiceUDPSocket
*
sock
;
NiceCandidate
*
candidate
;
GSList
*
candidates
;
candidates
=
nice_agent_get_local_candidates
(
agent
,
1
,
1
);
candidate
=
candidates
->
data
;
sock
=
candidate
->
sockptr
;
nice_
udp_socket_send
(
sock
,
&
(
candidate
->
addr
),
6
,
"
\x80
hello"
);
nice_
socket_send
(
candidate
->
sockptr
,
&
(
candidate
->
addr
),
6
,
"
\x80
hello"
);
g_slist_free
(
candidates
);
}
...
...
agent/test-poll.c
View file @
6ad5b7c6
...
...
@@ -44,7 +44,6 @@
#include <unistd.h>
#include <nice/nice.h>
#include "udp.h"
static
gboolean
cb_called
=
FALSE
;
...
...
@@ -73,7 +72,7 @@ main (void)
{
NiceAgent
*
agent
;
NiceAddress
addr
;
Nice
UDP
Socket
*
sock
;
NiceSocket
*
sock
;
gint
pipe_fds
[
2
];
GSList
*
fds
=
NULL
;
GSList
*
readable
;
...
...
@@ -132,7 +131,7 @@ main (void)
/* send fake data */
nice_
udp_
socket_send
(
sock
,
&
addr
,
7
,
"
\x80
lalala"
);
nice_socket_send
(
sock
,
&
addr
,
7
,
"
\x80
lalala"
);
/* poll again */
...
...
agent/test-recv.c
View file @
6ad5b7c6
...
...
@@ -41,7 +41,6 @@
#include <string.h>
#include "udp.h"
#include "agent.h"
int
...
...
@@ -66,7 +65,6 @@ main (void)
{
NiceCandidate
*
candidate
;
NiceUDPSocket
*
sock
;
guint
len
;
gchar
buf
[
1024
];
GSList
*
candidates
;
...
...
@@ -74,8 +72,7 @@ main (void)
candidates
=
nice_agent_get_local_candidates
(
agent
,
stream_id
,
1
);
candidate
=
candidates
->
data
;
g_slist_free
(
candidates
);
sock
=
candidate
->
sockptr
;
nice_udp_socket_send
(
sock
,
&
candidate
->
addr
,
7
,
"
\x80
lalala"
);
nice_socket_send
(
candidate
->
sockptr
,
&
candidate
->
addr
,
7
,
"
\x80
lalala"
);
len
=
nice_agent_recv
(
agent
,
stream_id
,
candidate
->
component_id
,
1024
,
buf
);
g_assert
(
len
==
7
);
...
...
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