下载资源前端资源详情
libnice-master.zip
大小:614.63KB
价格:36积分
下载量:0
评分:
5.0
上传者:qq_32073131
更新日期:2025-09-22

dfsgfdsghsdfhsdfh

资源文件列表(大概)

文件名
大小
libnice-master/
-
libnice-master/.gitignore
64B
libnice-master/.gitlab-ci.yml
11.32KB
libnice-master/.lcovrc
711B
libnice-master/agent/
-
libnice-master/agent/address.c
10.52KB
libnice-master/agent/address.h
7.85KB
libnice-master/agent/agent-priv.h
12.9KB
libnice-master/agent/agent.c
239.43KB
libnice-master/agent/agent.h
57.97KB
libnice-master/agent/candidate-priv.h
4.13KB
libnice-master/agent/candidate.c
14.66KB
libnice-master/agent/candidate.h
8.62KB
libnice-master/agent/component.c
51.52KB
libnice-master/agent/component.h
12.34KB
libnice-master/agent/conncheck.c
175.58KB
libnice-master/agent/conncheck.h
5.28KB
libnice-master/agent/debug.c
5.01KB
libnice-master/agent/debug.h
3.71KB
libnice-master/agent/discovery.c
44.85KB
libnice-master/agent/discovery.h
5.39KB
libnice-master/agent/inputstream.c
14.79KB
libnice-master/agent/inputstream.h
2.85KB
libnice-master/agent/interfaces.c
23.04KB
libnice-master/agent/interfaces.h
2.81KB
libnice-master/agent/iostream.c
10.87KB
libnice-master/agent/iostream.h
2.85KB
libnice-master/agent/meson.build
1.73KB
libnice-master/agent/outputstream.c
19.68KB
libnice-master/agent/outputstream.h
2.88KB
libnice-master/agent/pseudotcp.c
78.56KB
libnice-master/agent/pseudotcp.h
17.71KB
libnice-master/agent/stream.c
5.29KB
libnice-master/agent/stream.h
4.02KB
libnice-master/AUTHORS
187B
libnice-master/COPYING
237B
libnice-master/COPYING.LGPL
25.91KB
libnice-master/COPYING.MPL
25.06KB
libnice-master/docs/
-
libnice-master/docs/design.txt
8.78KB
libnice-master/docs/reference/
-
libnice-master/docs/reference/libnice/
-
libnice-master/docs/reference/libnice/libnice-docs.xml
4.67KB
libnice-master/docs/reference/libnice/libnice-sections.txt
8.59KB
libnice-master/docs/reference/libnice/meson.build
2.35KB
libnice-master/docs/reference/libnice/states.gv
1.13KB
libnice-master/docs/reference/libnice/states.png
47.59KB
libnice-master/examples/
-
libnice-master/examples/meson.build
251B
libnice-master/examples/sdp-example.c
8.52KB
libnice-master/examples/simple-example.c
12.69KB
libnice-master/examples/threaded-example.c
13.27KB
libnice-master/gst/
-
libnice-master/gst/gstnice.c
2.04KB
libnice-master/gst/gstnice.h
1.59KB
libnice-master/gst/gstnicesink.c
14.12KB
libnice-master/gst/gstnicesink.h
2.78KB
libnice-master/gst/gstnicesrc.c
11.67KB
libnice-master/gst/gstnicesrc.h
2.62KB
libnice-master/gst/meson.build
637B
libnice-master/meson.build
9.98KB
libnice-master/meson_options.txt
1.13KB
libnice-master/NEWS
13.75KB
libnice-master/nice/
-
libnice-master/nice/gen-def.py
281B
libnice-master/nice/gen-map.py
320B
libnice-master/nice/libnice.sym
4.46KB
libnice-master/nice/libnice.ver
56B
libnice-master/nice/meson.build
2.44KB
libnice-master/nice/nice-version.h.in
463B
libnice-master/nice/nice.h
2.32KB
libnice-master/nice/nice.pc.in
363B
libnice-master/random/
-
libnice-master/random/meson.build
452B
libnice-master/random/random-glib.c
2.55KB
libnice-master/random/random-glib.h
1.76KB
libnice-master/random/random.c
3.37KB
libnice-master/random/random.h
2.29KB
libnice-master/random/test.c
2.37KB
libnice-master/README
1.77KB
libnice-master/socket/
-
libnice-master/socket/http.c
20.16KB
libnice-master/socket/http.h
1.77KB
libnice-master/socket/meson.build
366B
libnice-master/socket/pseudossl.c
10.38KB
libnice-master/socket/pseudossl.h
2.21KB
libnice-master/socket/socket-priv.h
4.28KB
libnice-master/socket/socket.c
14.49KB
libnice-master/socket/socket.h
4.92KB
libnice-master/socket/socks5.c
14.72KB
libnice-master/socket/socks5.h
1.75KB
libnice-master/socket/tcp-active.c
8.82KB
libnice-master/socket/tcp-active.h
1.74KB
libnice-master/socket/tcp-bsd.c
13.03KB
libnice-master/socket/tcp-bsd.h
2.08KB
libnice-master/socket/tcp-passive.c
9.49KB
libnice-master/socket/tcp-passive.h
1.94KB
libnice-master/socket/udp-bsd.c
11.61KB
libnice-master/socket/udp-bsd.h
1.76KB
libnice-master/socket/udp-turn-over-tcp.c
13.19KB
libnice-master/socket/udp-turn-over-tcp.h
1.79KB
libnice-master/socket/udp-turn.c
69.06KB
libnice-master/socket/udp-turn.h
2.74KB
libnice-master/stun/
-
libnice-master/stun/constants.h
5.08KB
libnice-master/stun/debug.c
3.15KB
libnice-master/stun/debug.h
3.07KB
libnice-master/stun/meson.build
778B
libnice-master/stun/rand.c
2.13KB
libnice-master/stun/rand.h
1.69KB
libnice-master/stun/stun5389.c
3.5KB
libnice-master/stun/stun5389.h
2.22KB
libnice-master/stun/stunagent.c
24.49KB
libnice-master/stun/stunagent.h
21.55KB
libnice-master/stun/stuncrc32.c
7.64KB
libnice-master/stun/stuncrc32.h
1.86KB
libnice-master/stun/stunhmac.c
8.45KB
libnice-master/stun/stunhmac.h
2.44KB
libnice-master/stun/stunmessage.c
20.01KB
libnice-master/stun/stunmessage.h
35.95KB
libnice-master/stun/tests/
-
libnice-master/stun/tests/check-bind.sh
1.04KB
libnice-master/stun/tests/meson.build
680B
libnice-master/stun/tests/test-bind.c
12.35KB
libnice-master/stun/tests/test-conncheck.c
12.04KB
libnice-master/stun/tests/test-format.c
8.66KB
libnice-master/stun/tests/test-hmac.c
2.73KB
libnice-master/stun/tests/test-parse.c
23.99KB
libnice-master/stun/tests/test-turn.c
7.1KB
libnice-master/stun/tools/
-
libnice-master/stun/tools/meson.build
264B
libnice-master/stun/tools/stunbdc.c
5.02KB
libnice-master/stun/tools/stund.c
7.5KB
libnice-master/stun/tools/stund.h
1.8KB
libnice-master/stun/usages/
-
libnice-master/stun/usages/bind.c
14.49KB
libnice-master/stun/usages/bind.h
6.05KB
libnice-master/stun/usages/ice.c
12.08KB
libnice-master/stun/usages/ice.h
9.2KB
libnice-master/stun/usages/timer.c
4.23KB
libnice-master/stun/usages/timer.h
7.6KB
libnice-master/stun/usages/turn.c
14.67KB
libnice-master/stun/usages/turn.h
11.88KB
libnice-master/stun/utils.c
3.46KB
libnice-master/stun/utils.h
2.24KB
libnice-master/stun/win32_common.h
2.53KB
libnice-master/subprojects/
-
libnice-master/subprojects/glib.wrap
225B
libnice-master/subprojects/zlib.wrap
449B
libnice-master/tests/
-
libnice-master/tests/docker/
-
libnice-master/tests/docker/centos7-meson/
-
libnice-master/tests/docker/centos7-meson/Dockerfile
1.22KB
libnice-master/tests/docker/centos7-meson/pip-installs.sh
302B
libnice-master/tests/docker/fedora38/
-
libnice-master/tests/docker/fedora38/pip-installs.sh
47B
libnice-master/tests/libnice.supp
7.76KB
libnice-master/tests/meson.build
3.16KB
libnice-master/tests/test-add-remove-stream.c
2.48KB
libnice-master/tests/test-address.c
9.52KB
libnice-master/tests/test-bsd.c
13.47KB
libnice-master/tests/test-build-io-stream.c
15.16KB
libnice-master/tests/test-bytestream-tcp.c
3.69KB
libnice-master/tests/test-consent.c
19.13KB
libnice-master/tests/test-credentials.c
6.48KB
libnice-master/tests/test-different-number-streams.c
8.03KB
libnice-master/tests/test-drop-invalid.c
19.89KB
libnice-master/tests/test-fallback.c
21.07KB
libnice-master/tests/test-fullmode-with-stun.c
1.5KB
libnice-master/tests/test-fullmode.c
41.25KB
libnice-master/tests/test-gstreamer.c
9.83KB
libnice-master/tests/test-icetcp.c
17.96KB
libnice-master/tests/test-interfaces.c
3.3KB
libnice-master/tests/test-io-stream-cancelling.c
4.08KB
libnice-master/tests/test-io-stream-closing-read.c
3.56KB
libnice-master/tests/test-io-stream-closing-write.c
3.6KB
libnice-master/tests/test-io-stream-common.c
17.06KB
libnice-master/tests/test-io-stream-common.h
3.98KB
libnice-master/tests/test-io-stream-pollable.c
5.11KB
libnice-master/tests/test-io-stream-thread.c
4.42KB
libnice-master/tests/test-new-trickle.c
26.33KB
libnice-master/tests/test-nomination.c
8.66KB
libnice-master/tests/test-priority.c
3.9KB
libnice-master/tests/test-pseudotcp-fin.c
36.77KB
libnice-master/tests/test-pseudotcp-fuzzy.c
12.93KB
libnice-master/tests/test-pseudotcp-random.sh
200B
libnice-master/tests/test-pseudotcp.c
7.55KB
libnice-master/tests/test-restart.c
17.7KB
libnice-master/tests/test-send-recv.c
43.31KB
libnice-master/tests/test-set-port-range.c
2.34KB
libnice-master/tests/test-socket-is-based-on.c
4.13KB
libnice-master/tests/test-tcp.c
5.1KB
libnice-master/tests/test-thread.c
11.27KB
libnice-master/tests/test-trickle.c
15.18KB
libnice-master/tests/test-turn.c
12.3KB
libnice-master/tests/test-udp-turn-fragmentation.c
6.19KB
libnice-master/tests/test.c
3.9KB
libnice-master/TODO
603B

资源内容介绍

fdgs
Nice: Design documentation==========================Socket ownership----------------For UDP candidates, one socket is created for each component and boundto INADDR_ANY. The same local socket is used for the host candidate,STUN candidate as well as the TURN candidate. The socket handles arestored to the Component structure.The library will use the source address of incoming packets in orderto identify from which remote candidates, if any (peer-derivedcandidates), packets were sent.XXX: Describe the subtle issues with ICMP error handling when onesocket is used to send to multiple destinations.Real-time considerations------------------------One potential use for libnice code is providing network connectivityfor media transport in voice and video telephony applications. Thismeans that the libnice code is potentially run in real-time context(for instance under POSIX SCHED_FIFO/SHCED_RR scheduling policy) andideally has deterministic execution time.To be real-time friendly, operations with non-deterministic executiontime (dynamic memory allocation, file and other resource access) shouldbe done at startup/initialization phase. During an active session(connectivity has been established and non-STUN traffic is being sent),code should be as deterministic as possible.Memory management-----------------To work on platforms where available memory may be constrained, libniceshould gracefully handle out of memory situations. If memory allocationfails, the library should return an error via the originating publiclibrary API function.Use of glib creates some challenges to meet the above:- A lot of glib's internal code assumes memory allocations will always work. Use of these glib facilities should be limited. While the glib default policy (see g_malloc() documentation) of terminating the process is ok for applications, this is not acceptable for library components.- Glib has weak support for preallocating structures needed at runtime (for instance use of timers creates a lot of memory allocation activity). To work around the above limitations, the following guidelines needto be followed:- Always check return values of glib functions.- Use safe variants: g_malloc_try(), etc- Current issues (last update 2007-05-04) - g_slist_append() will crash if alloc failsTimers------Management of timers is handled by the 'agent' module. Other modules may use timer APIs to get timestamps, but they do not run timers. Glib's timer interface has some problems that have affected the design: - an expired timer will destroy the source (a potentially costly operation) - it is not possible to cancel, or adjust the timer expiration timer without destroying the associated source and creating a new one, which again causes malloc/frees and is potentially a costly operation - on Linux, glib uses gettimeofday() which is subject to clock skew, and no monotonic timer API is availableDue to the above, 'agent' code runs fixed interval periodic timers(started with g_timeout_add()) during candidate gathering, connectivitycheck, and session keepalive phases. Timer frequency is set separatelyfor each phase of processing. A more elegant design would use dynamictimeouts, but this would be too expensive with glib timerinfrastructure.Control flow for NICE agent API (NiceAgentClass)------------------------------------------------The main library interface for applications using libnice is theNiceAgent GObject interface defined in 'nice/agent.h'.The rough order of control follow is as follows:- creation of NiceAgent object instance- setting agent properties such as STUN and TURN server addresses- connecting the GObject signals with g_signal_connect() to application callback functions- adding local interface addresses to use with nice_agent_add_local_address()And continues when making an initial offer:- creating the streams with nice_agent_add_stream()- attach the mainloop context to connect the NiceAgent sockets to the application's event loop (using nice_agent_attach_recv())- start candidate gathering by calling nice_agent_gather_candidates()- the application should wait for the "candidate-gathering-done" signal before going forward (so that ICE can gather the needed set of local connectiviy candidates) - get the information needed for sending offer using nice_agent_get_local_candidates() and nice_agent_get_local_credentials()- client should now send the session offer- once it receives an answer, it can pass the information to NiceAgent using nice_agent_set_remote_candidates() and nice_agent_set_remote_credentials()Alternatively, when answering to an initial offer:- the first five steps are the same as above (making initial offer)- pass the remote session information to NiceAgent using nice_agent_set_remote_candidates() and nice_agent_set_remote_credentials()- client can send the answer to session offerSpecial considerations for a SIP client:- Upon sending the initial offer/answer, client should pick one local candidate as the default one, and encode it to the SDP "m" and "c" lines, in addition to the ICE "a=candidate" lines.- Client should connect to "new-selected-pair" signals. If this signal is received, a new candidate pair has been set as a selected pair (highest priority nominated pair). See ICE specification for a definition of "nominated pairs". - Once all components of a stream have reached the "NICE_COMPONENT_STATE_READY" state (as reported by "component-state-changed" signals), the client should check whether its original default candidate matches the latest selected pair. If not, it needs to send an updated offer it is in controlling mode. Before sending the offer, client should check the "controlling-mode" property to check that it still is in controlling mode (might change during ICE processing due to ICE role conflicts).- The "remote-attributes" SDP attribute can be created from the information provided by "component-state-changed" (which components are ready), "new-selected-pair" (which candidates are selected) and "new-remote-candidate" (peer-reflexive candidates discovered during processing) signals.- Supporting forked calls is not yet supported by the API (multiple sets of remote candidates for one local set of candidates).Restarting ICE:- ICE processing can be restarted by calling nice_agent_restart()- Restart will clean the set of remote candidates, so client must afterwards call nice_agent_set_remote_candidates() after receiving a new offer/answer for the restarted ICE session.- Restart will reinitialize the local credentials (see nice_agent_get_local_credentials()).- Note that to modify the set of local candidates, a new stream has to be created. For the remote party, this looks like a ICE restart as well.Handling fallback to non-ICE operation:- If we are the offering party, and the remote party indicates it doesn't support ICE, we can use nice_agent_set_selected_pair() to force selection of a candidate pair (for remote party, the information on SDP 'm=' and 'c=' lines needs to be used to generate one remote candidate for each component of the streams). This function will halt all ICE processing (excluding keepalives), while still allowing to send and receive media (assuming NATs won't interfere).Notes about sending media:- Client may send media once all components of a stream have reached state of NICE_COMPONENT_STATE_CONNECTED or NICE_COMPONENT_STATE_READY, (as reported by "component-state-changed" signals), and a selected pair is set for all components (as reported by "new-selected-pair" signals).STUN API--------The underlying STUN library takes care of formatting and parsing STUNmessages (lower layer),Applications should only need to use the higher layer API which thenuses the lower layer API.The following STUN usages ar

用户评论 (0)

发表评论

captcha