這裏總結了一些常見的網絡服務器開發中用到的C/C++開發的開源項目核心代碼的代碼規模,主要是爲了後續研讀這些優秀的開源項目的代碼,學習他們的設計而提供一些參考。 html
項目主頁:http://software.schmorp.de/pkg/libev.html java
版本:4.22 node
libev是libevent以後的一個事件驅動的編程框架,其接口和libevent基本相似。這個庫只支持*nix平臺,於是能夠拋掉不少爲跨平臺而有的負擔,從而使得它的性能比libevent還要高,bug比libevent還少。 mysql
libev-4.22/ev_vars.h : 204
libev-4.22/ev_epoll.c : 282
libev-4.22/event.h : 177
libev-4.22/ev_kqueue.c : 214
libev-4.22/ev.h : 854
libev-4.22/ev_poll.c : 148
libev-4.22/ev.c : 5097
libev-4.22/ev_select.c : 314
libev-4.22/ev_wrap.h : 200
libev-4.22/event.c : 425
libev-4.22/ev++.h : 816
libev-4.22/ev_port.c : 185
total line num = 8916 filenum = 12
linux
這個項目的核心代碼,算上頭文件和C實現文件,總共大概8916行。代碼規模不大,卻是很方便咱們學習高效的Linux環境下的C/C++編程。 android
項目主頁:http://dirtysalt.info/muduo.html git
Github主頁:https://github.com/chenshuo/muduo github
版本:1.0.8 redis
這是一個基於 Reactor 模式的 C++ 網絡庫。這個項目同livev同樣,只支持*nix平臺。受益於不須要支持多平臺,而使得這個庫的性能相對於libevent要更好一些,代碼量更少。這個項目的做者 陳碩 有本書專門分析解讀了這個項目的code——《Linux多線程服務端編程》。在那本書裏面還介紹了許多編寫工業級Linux平臺網絡程序的許多技巧,於是仍是很值得一讀的。配合着 陳碩 的那本書,來研讀這個項目的代碼,相信必定能夠更快地有所收穫。 sql
muduo-1.0.8/muduo/base/StringPiece.h : 207
muduo-1.0.8/muduo/base/LogFile.cc : 130
muduo-1.0.8/muduo/base/Thread.h : 55
muduo-1.0.8/muduo/base/Exception.h : 33
muduo-1.0.8/muduo/base/Condition.h : 56
muduo-1.0.8/muduo/base/Condition.cc : 20
muduo-1.0.8/muduo/base/Logging.cc : 222
muduo-1.0.8/muduo/base/Exception.cc : 57
muduo-1.0.8/muduo/base/Thread.cc : 223
muduo-1.0.8/muduo/base/LogFile.h : 54
muduo-1.0.8/muduo/base/Singleton.h : 76
muduo-1.0.8/muduo/base/LogStream.h : 199
muduo-1.0.8/muduo/base/BlockingQueue.h : 80
muduo-1.0.8/muduo/base/ProcessInfo.cc : 250
muduo-1.0.8/muduo/base/Types.h : 126
muduo-1.0.8/muduo/base/copyable.h : 16
muduo-1.0.8/muduo/base/WeakCallback.h : 124
muduo-1.0.8/muduo/base/Atomic.h : 95
muduo-1.0.8/muduo/base/BoundedBlockingQueue.h : 90
muduo-1.0.8/muduo/base/FileUtil.h : 92
muduo-1.0.8/muduo/base/CountDownLatch.cc : 41
muduo-1.0.8/muduo/base/ThreadPool.cc : 176
muduo-1.0.8/muduo/base/Date.cc : 75
muduo-1.0.8/muduo/base/ThreadLocalSingleton.h : 82
muduo-1.0.8/muduo/base/CurrentThread.h : 52
muduo-1.0.8/muduo/base/Logging.h : 154
muduo-1.0.8/muduo/base/Mutex.h : 163
muduo-1.0.8/muduo/base/Timestamp.h : 116
muduo-1.0.8/muduo/base/ThreadLocal.h : 58
muduo-1.0.8/muduo/base/AsyncLogging.h : 78
muduo-1.0.8/muduo/base/CountDownLatch.h : 36
muduo-1.0.8/muduo/base/AsyncLogging.cc : 129
muduo-1.0.8/muduo/base/Timestamp.cc : 58
muduo-1.0.8/muduo/base/ThreadPool.h : 68
muduo-1.0.8/muduo/base/LogStream.cc : 212
muduo-1.0.8/muduo/base/FileUtil.cc : 198
muduo-1.0.8/muduo/base/TimeZone.h : 51
muduo-1.0.8/muduo/base/TimeZone.cc : 358
muduo-1.0.8/muduo/base/ProcessInfo.h : 68
muduo-1.0.8/muduo/base/GzipFile.h : 84
muduo-1.0.8/muduo/base/Date.h : 118
muduo-1.0.8/muduo/net/InetAddress.h : 83
muduo-1.0.8/muduo/net/TcpConnection.cc : 429
muduo-1.0.8/muduo/net/TcpClient.h : 101
muduo-1.0.8/muduo/net/TimerQueue.h : 91
muduo-1.0.8/muduo/net/Acceptor.h : 60
muduo-1.0.8/muduo/net/TcpServer.cc : 122
muduo-1.0.8/muduo/net/EventLoop.h : 175
muduo-1.0.8/muduo/net/TimerQueue.cc : 277
muduo-1.0.8/muduo/net/Socket.h : 88
muduo-1.0.8/muduo/net/Buffer.h : 422
muduo-1.0.8/muduo/net/Buffer.cc : 58
muduo-1.0.8/muduo/net/SocketsOps.h : 64
muduo-1.0.8/muduo/net/SocketsOps.cc : 305
muduo-1.0.8/muduo/net/EventLoopThreadPool.cc : 100
muduo-1.0.8/muduo/net/TimerId.h : 53
muduo-1.0.8/muduo/net/Channel.h : 123
muduo-1.0.8/muduo/net/InetAddress.cc : 143
muduo-1.0.8/muduo/net/Poller.h : 71
muduo-1.0.8/muduo/net/Endian.h : 72
muduo-1.0.8/muduo/net/Poller.cc : 31
muduo-1.0.8/muduo/net/EventLoopThread.h : 52
muduo-1.0.8/muduo/net/EventLoopThread.cc : 77
muduo-1.0.8/muduo/net/EventLoop.cc : 319
muduo-1.0.8/muduo/net/Callbacks.h : 65
muduo-1.0.8/muduo/net/TcpConnection.h : 161
muduo-1.0.8/muduo/net/Connector.h : 75
muduo-1.0.8/muduo/net/EventLoopThreadPool.h : 69
muduo-1.0.8/muduo/net/Timer.cc : 26
muduo-1.0.8/muduo/net/ZlibStream.h : 146
muduo-1.0.8/muduo/net/TcpClient.cc : 183
muduo-1.0.8/muduo/net/Channel.cc : 146
muduo-1.0.8/muduo/net/Timer.h : 72
muduo-1.0.8/muduo/net/Connector.cc : 228
muduo-1.0.8/muduo/net/boilerplate.cc : 15
muduo-1.0.8/muduo/net/TcpServer.h : 123
muduo-1.0.8/muduo/net/Acceptor.cc : 90
muduo-1.0.8/muduo/net/Socket.cc : 129
muduo-1.0.8/muduo/net/boilerplate.h : 32
muduo-1.0.8/muduo/net/http/HttpServer.h : 71
muduo-1.0.8/muduo/net/http/HttpResponse.cc : 49
muduo-1.0.8/muduo/net/http/HttpRequest.h : 186
muduo-1.0.8/muduo/net/http/HttpContext.cc : 118
muduo-1.0.8/muduo/net/http/HttpResponse.h : 79
muduo-1.0.8/muduo/net/http/HttpContext.h : 72
muduo-1.0.8/muduo/net/http/HttpServer.cc : 106
muduo-1.0.8/muduo/net/protobuf/ProtobufCodecLite.cc : 226
muduo-1.0.8/muduo/net/protobuf/BufferStream.h : 56
muduo-1.0.8/muduo/net/protobuf/ProtobufCodecLite.h : 205
muduo-1.0.8/muduo/net/inspect/SystemInspector.cc : 134
muduo-1.0.8/muduo/net/inspect/Inspector.h : 70
muduo-1.0.8/muduo/net/inspect/PerformanceInspector.h : 41
muduo-1.0.8/muduo/net/inspect/ProcessInspector.cc : 240
muduo-1.0.8/muduo/net/inspect/Inspector.cc : 385
muduo-1.0.8/muduo/net/inspect/SystemInspector.h : 37
muduo-1.0.8/muduo/net/inspect/PerformanceInspector.cc : 104
muduo-1.0.8/muduo/net/inspect/ProcessInspector.h : 39
muduo-1.0.8/muduo/net/protorpc/RpcServer.h : 57
muduo-1.0.8/muduo/net/protorpc/google-inl.h : 84
muduo-1.0.8/muduo/net/protorpc/RpcServer.cc : 70
muduo-1.0.8/muduo/net/protorpc/RpcCodec.cc : 39
muduo-1.0.8/muduo/net/protorpc/RpcCodec.h : 49
muduo-1.0.8/muduo/net/protorpc/RpcChannel.cc : 187
muduo-1.0.8/muduo/net/protorpc/RpcChannel.h : 154
muduo-1.0.8/muduo/net/poller/EPollPoller.cc : 209
muduo-1.0.8/muduo/net/poller/DefaultPoller.cc : 27
muduo-1.0.8/muduo/net/poller/EPollPoller.h : 55
muduo-1.0.8/muduo/net/poller/PollPoller.cc : 142
muduo-1.0.8/muduo/net/poller/PollPoller.h : 49
total line num = 12796 filenum = 109
這個庫的全部核心代碼,總共大概也就在12796行。代碼規模比較小,方便咱們研讀與掌握。
項目主頁:http://libevent.org/
大名鼎鼎的libevent。它是一個用C語言編寫的、輕量級的開源高性能網絡庫,它的主要亮點便是事件驅動(event-driven),高性能,輕量級。它支持Windows、 Linux、 *BSD 和 Mac Os等多個不一樣的平臺。支持多種 I/O 多路複用技術, epoll、 poll、 dev/poll、 select 和 kqueue 等;支持 I/O,定時器和信號等事件;註冊事件優先級。
當前這個庫已經被用在了Chromium、Memcached、Transmission和Tor等衆多很是成功的開源項目中了。
它的代碼至關精煉、易讀,於是也是咱們學習網絡編程一份不可多得的好材料。
libevent-2.0.22-stable/bufferevent_sock.c : 699
libevent-2.0.22-stable/log-internal.h : 59
libevent-2.0.22-stable/bufferevent_openssl.c : 1454
libevent-2.0.22-stable/strlcpy-internal.h : 21
libevent-2.0.22-stable/bufferevent-internal.h : 410
libevent-2.0.22-stable/evhttp.h : 45
libevent-2.0.22-stable/autogen.sh : 15
libevent-2.0.22-stable/buffer_iocp.c : 325
libevent-2.0.22-stable/event.h : 85
libevent-2.0.22-stable/evmap.c : 799
libevent-2.0.22-stable/bufferevent_ratelim.c : 1011
libevent-2.0.22-stable/evthread-internal.h : 382
libevent-2.0.22-stable/ltmain.sh : 9655
libevent-2.0.22-stable/log.c : 224
libevent-2.0.22-stable/http.c : 4529
libevent-2.0.22-stable/epoll.c : 473
libevent-2.0.22-stable/changelist-internal.h : 101
libevent-2.0.22-stable/signal.c : 445
libevent-2.0.22-stable/minheap-internal.h : 160
libevent-2.0.22-stable/event-internal.h : 368
libevent-2.0.22-stable/strlcpy.c : 74
libevent-2.0.22-stable/evthread_pthread.c : 189
libevent-2.0.22-stable/buffer.c : 3122
libevent-2.0.22-stable/evport.c : 473
libevent-2.0.22-stable/event_tagging.c : 596
libevent-2.0.22-stable/listener.c : 886
libevent-2.0.22-stable/evdns.c : 4675
libevent-2.0.22-stable/select.c : 333
libevent-2.0.22-stable/iocp-internal.h : 201
libevent-2.0.22-stable/bufferevent.c : 875
libevent-2.0.22-stable/mm-internal.h : 61
libevent-2.0.22-stable/event_iocp.c : 293
libevent-2.0.22-stable/event_rpcgen.py : 1717
libevent-2.0.22-stable/install-sh : 527
libevent-2.0.22-stable/evrpc.c : 1174
libevent-2.0.22-stable/evutil.c : 2190
libevent-2.0.22-stable/evthread.c : 445
libevent-2.0.22-stable/ratelim-internal.h : 105
libevent-2.0.22-stable/evbuffer-internal.h : 293
libevent-2.0.22-stable/kqueue.c : 475
libevent-2.0.22-stable/defer-internal.h : 100
libevent-2.0.22-stable/poll.c : 333
libevent-2.0.22-stable/devpoll.c : 306
libevent-2.0.22-stable/util-internal.h : 329
libevent-2.0.22-stable/ipv6-internal.h : 81
libevent-2.0.22-stable/ht-internal.h : 484
libevent-2.0.22-stable/evrpc.h : 45
libevent-2.0.22-stable/evmap-internal.h : 92
libevent-2.0.22-stable/evsignal-internal.h : 64
libevent-2.0.22-stable/arc4random.c : 555
libevent-2.0.22-stable/bufferevent_pair.c : 334
libevent-2.0.22-stable/config.h : 443
libevent-2.0.22-stable/epoll_sub.c : 65
libevent-2.0.22-stable/bufferevent_async.c : 690
libevent-2.0.22-stable/evrpc-internal.h : 204
libevent-2.0.22-stable/event.c : 2943
libevent-2.0.22-stable/bufferevent_filter.c : 511
libevent-2.0.22-stable/evutil_rand.c : 180
libevent-2.0.22-stable/evdns.h : 45
libevent-2.0.22-stable/http-internal.h : 195
libevent-2.0.22-stable/evutil.h : 39
libevent-2.0.22-stable/WIN32-Code/tree.h : 1354
libevent-2.0.22-stable/include/event2/bufferevent_compat.h : 100
libevent-2.0.22-stable/include/event2/dns_compat.h : 336
libevent-2.0.22-stable/include/event2/event_compat.h : 220
libevent-2.0.22-stable/include/event2/event.h : 1204
libevent-2.0.22-stable/include/event2/http.h : 863
libevent-2.0.22-stable/include/event2/http_struct.h : 130
libevent-2.0.22-stable/include/event2/rpc_struct.h : 100
libevent-2.0.22-stable/include/event2/http_compat.h : 90
libevent-2.0.22-stable/include/event2/rpc_compat.h : 61
libevent-2.0.22-stable/include/event2/util.h : 713
libevent-2.0.22-stable/include/event2/keyvalq_struct.h : 80
libevent-2.0.22-stable/include/event2/tag_compat.h : 49
libevent-2.0.22-stable/include/event2/event_struct.h : 141
libevent-2.0.22-stable/include/event2/rpc.h : 596
libevent-2.0.22-stable/include/event2/bufferevent_struct.h : 116
libevent-2.0.22-stable/include/event2/bufferevent_ssl.h : 107
libevent-2.0.22-stable/include/event2/event-config.h : 458
libevent-2.0.22-stable/include/event2/tag.h : 124
libevent-2.0.22-stable/include/event2/bufferevent.h : 821
libevent-2.0.22-stable/include/event2/listener.h : 143
libevent-2.0.22-stable/include/event2/buffer_compat.h : 110
libevent-2.0.22-stable/include/event2/dns.h : 643
libevent-2.0.22-stable/include/event2/thread.h : 236
libevent-2.0.22-stable/include/event2/buffer.h : 842
libevent-2.0.22-stable/include/event2/dns_struct.h : 80
libevent-2.0.22-stable/WIN32-Code/event2/event-config.h : 363
libevent-2.0.22-stable/compat/sys/queue.h : 488
total line num = 58570 filenum = 89
這個項目的核心代碼接近6W行,相對libev和muduo仍是要多很多,爲了跨平臺嘛,不免要多不少東西。
Github主頁:https://github.com/libuv/libuv
這是一個與libev、libevent相似的網絡IO庫。node.js的做者封裝的一個事件庫。*NIX的部分實現基於libev來作,而windows的部分則爲本身封裝的。但這個項目在libev的基礎之上仍是作了很多優化的。具體這個庫與libev的差異,能夠參考CSDN上的一篇文章 libev和libuv的區別。
libuv-1.8.0/autogen.sh : 46
libuv-1.8.0/checksparse.sh : 234
libuv-1.8.0/gyp_uv.py : 93
libuv-1.8.0/src/uv-common.h : 227
libuv-1.8.0/src/version.c : 45
libuv-1.8.0/src/threadpool.c : 303
libuv-1.8.0/src/uv-common.c : 627
libuv-1.8.0/src/fs-poll.c : 255
libuv-1.8.0/src/inet.c : 309
libuv-1.8.0/src/heap-inl.h : 245
libuv-1.8.0/src/queue.h : 108
libuv-1.8.0/include/stdint-msvc2008.h : 247
libuv-1.8.0/include/pthread-fixes.h : 72
libuv-1.8.0/include/uv-unix.h : 383
libuv-1.8.0/include/uv-threadpool.h : 37
libuv-1.8.0/include/android-ifaddrs.h : 54
libuv-1.8.0/include/uv-version.h : 43
libuv-1.8.0/include/uv.h : 1482
libuv-1.8.0/include/uv-linux.h : 34
libuv-1.8.0/include/uv-errno.h : 418
libuv-1.8.0/include/uv-sunos.h : 44
libuv-1.8.0/include/uv-aix.h : 32
libuv-1.8.0/include/uv-bsd.h : 34
libuv-1.8.0/include/tree.h : 768
libuv-1.8.0/src/unix/core.c : 1104
libuv-1.8.0/src/unix/stream.c : 1615
libuv-1.8.0/src/unix/thread.c : 525
libuv-1.8.0/src/unix/freebsd.c : 450
libuv-1.8.0/src/unix/atomic-ops.h : 77
libuv-1.8.0/src/unix/tcp.c : 362
libuv-1.8.0/src/unix/process.c : 563
libuv-1.8.0/src/unix/fsevents.c : 904
libuv-1.8.0/src/unix/signal.c : 467
libuv-1.8.0/src/unix/spinlock.h : 53
libuv-1.8.0/src/unix/loop.c : 155
libuv-1.8.0/src/unix/dl.c : 80
libuv-1.8.0/src/unix/proctitle.c : 102
libuv-1.8.0/src/unix/internal.h : 316
libuv-1.8.0/src/unix/linux-syscalls.h : 158
libuv-1.8.0/src/unix/async.c : 290
libuv-1.8.0/src/unix/linux-syscalls.c : 471
libuv-1.8.0/src/unix/tty.c : 279
libuv-1.8.0/src/unix/linux-inotify.c : 285
libuv-1.8.0/src/unix/sunos.c : 765
libuv-1.8.0/src/unix/netbsd.c : 370
libuv-1.8.0/src/unix/aix.c : 1158
libuv-1.8.0/src/unix/getnameinfo.c : 120
libuv-1.8.0/src/unix/openbsd.c : 386
libuv-1.8.0/src/unix/kqueue.c : 426
libuv-1.8.0/src/unix/loop-watcher.c : 68
libuv-1.8.0/src/unix/android-ifaddrs.c : 703
libuv-1.8.0/src/unix/poll.c : 113
libuv-1.8.0/src/unix/udp.c : 873
libuv-1.8.0/src/unix/linux-core.c : 899
libuv-1.8.0/src/unix/getaddrinfo.c : 202
libuv-1.8.0/src/unix/pthread-fixes.c : 104
libuv-1.8.0/src/unix/timer.c : 172
libuv-1.8.0/src/unix/fs.c : 1310
libuv-1.8.0/src/unix/pipe.c : 288
libuv-1.8.0/docs/src/conf.py : 348
libuv-1.8.0/docs/src/sphinx-plugins/manpage.py : 46
total line num = 22747 filenum = 61
整體來看,代碼規模不是很大。做爲node.js的核心庫,相信質量是很高的。想對於libev和libevent的諸多優勢,於是也很值得咱們一番細緻研讀。
Github主頁:https://github.com/memcached/memcached
Memcached是一個高性能的分佈式內存對象緩存系統,用於動態Web應用以減輕數據庫負載。它經過在內存中緩存數據和對象來減小讀取數據庫的次數,從而提升動態、數據庫驅動網站的速度。Memcached基於一個存儲鍵/值對的hashmap。其守護進程(daemon )是用C寫的,可是客戶端能夠用任何語言來編寫,並經過memcached協議與守護進程通訊。
memcached/trace.h : 71
memcached/thread.c : 802
memcached/timedrun.c : 102
memcached/autogen.sh : 52
memcached/sasl_defs.h : 31
memcached/slabs.c : 978
memcached/protocol_binary.h : 470
memcached/cache.c : 148
memcached/cache.h : 116
memcached/murmur3_hash.h : 19
memcached/daemon.c : 89
memcached/murmur3_hash.c : 124
memcached/hash.c : 21
memcached/stats.h : 8
memcached/globals.c : 25
memcached/stats.c : 375
memcached/util.h : 33
memcached/memcached.h : 625
memcached/memcached.c : 5793
memcached/util.c : 144
memcached/slabs.h : 53
memcached/assoc.h : 10
memcached/jenkins_hash.h : 15
memcached/version.sh : 11
memcached/jenkins_hash.c : 431
memcached/solaris_priv.c : 44
memcached/sizes.c : 29
memcached/hash.h : 14
memcached/sasl_defs.c : 190
memcached/assoc.c : 306
memcached/items.c : 1492
memcached/items.h : 46
total line num = 12667 filenum = 32
這個項目代碼量不大,總體清晰簡潔,代碼質量很是高。於是很值得咱們研讀。
項目主頁:http://redis.io/
Redis是一個開源的使用ANSI C語言編寫、支持網絡、可基於內存亦可持久化的日誌型、Key-Value數據庫,並提供多種語言的API。從2010年3月15日起,Redis的開發工做由VMware主持。從2013年5月開始,Redis的開發由Pivotal贊助。
redis-3.0.7/src/rio.h : 139
redis-3.0.7/src/crc16.c : 88
redis-3.0.7/src/sds.h : 101
redis-3.0.7/src/replication.c : 2349
redis-3.0.7/src/ziplist.h : 46
redis-3.0.7/src/sentinel.c : 3959
redis-3.0.7/src/config.c : 1929
redis-3.0.7/src/redis-benchmark.c : 811
redis-3.0.7/src/rio.c : 350
redis-3.0.7/src/redis-check-dump.c : 771
redis-3.0.7/src/ae_epoll.c : 137
redis-3.0.7/src/mkreleasehdr.sh : 11
redis-3.0.7/src/db.c : 1247
redis-3.0.7/src/zmalloc.h : 86
redis-3.0.7/src/release.c : 52
redis-3.0.7/src/pqsort.c : 185
redis-3.0.7/src/object.c : 739
redis-3.0.7/src/sha1.c : 226
redis-3.0.7/src/slowlog.c : 169
redis-3.0.7/src/version.h : 1
redis-3.0.7/src/multi.c : 323
redis-3.0.7/src/rand.c : 93
redis-3.0.7/src/aof.c : 1506
redis-3.0.7/src/networking.c : 1780
redis-3.0.7/src/t_zset.c : 2918
redis-3.0.7/src/ae_kqueue.c : 138
redis-3.0.7/src/lzf_c.c : 295
redis-3.0.7/src/rand.h : 38
redis-3.0.7/src/t_string.c : 457
redis-3.0.7/src/cluster.h : 261
redis-3.0.7/src/lzfP.h : 159
redis-3.0.7/src/latency.c : 623
redis-3.0.7/src/ae.c : 465
redis-3.0.7/src/pqsort.h : 40
redis-3.0.7/src/asciilogo.h : 47
redis-3.0.7/src/zipmap.c : 465
redis-3.0.7/src/redis.h : 1584
redis-3.0.7/src/crc64.c : 191
redis-3.0.7/src/anet.h : 75
redis-3.0.7/src/ae.h : 120
redis-3.0.7/src/redis-check-aof.c : 218
redis-3.0.7/src/bio.c : 220
redis-3.0.7/src/util.h : 45
redis-3.0.7/src/redisassert.h : 47
redis-3.0.7/src/fmacros.h : 61
redis-3.0.7/src/endianconv.c : 124
redis-3.0.7/src/intset.h : 50
redis-3.0.7/src/adlist.c : 341
redis-3.0.7/src/util.c : 689
redis-3.0.7/src/rdb.h : 115
redis-3.0.7/src/debug.c : 970
redis-3.0.7/src/redis.c : 3711
redis-3.0.7/src/ae_evport.c : 320
redis-3.0.7/src/dict.c : 1125
redis-3.0.7/src/ziplist.c : 1536
redis-3.0.7/src/t_set.c : 919
redis-3.0.7/src/sort.c : 568
redis-3.0.7/src/dict.h : 185
redis-3.0.7/src/bio.h : 41
redis-3.0.7/src/t_hash.c : 771
redis-3.0.7/src/help.h : 1002
redis-3.0.7/src/endianconv.h : 74
redis-3.0.7/src/sparkline.c : 176
redis-3.0.7/src/solarisfixes.h : 54
redis-3.0.7/src/sds.c : 1106
redis-3.0.7/src/lzf_d.c : 150
redis-3.0.7/src/slowlog.h : 47
redis-3.0.7/src/intset.c : 483
redis-3.0.7/src/blocked.c : 183
redis-3.0.7/src/setproctitle.c : 261
redis-3.0.7/src/lzf.h : 100
redis-3.0.7/src/zmalloc.c : 366
redis-3.0.7/src/rdb.c : 1562
redis-3.0.7/src/sha1.h : 17
redis-3.0.7/src/ae_select.c : 105
redis-3.0.7/src/zipmap.h : 49
redis-3.0.7/src/bitops.c : 600
redis-3.0.7/src/config.h : 204
redis-3.0.7/src/latency.h : 93
redis-3.0.7/src/crc64.h : 8
redis-3.0.7/src/adlist.h : 93
redis-3.0.7/src/pubsub.c : 371
redis-3.0.7/src/anet.c : 630
redis-3.0.7/src/syncio.c : 145
redis-3.0.7/src/scripting.c : 1202
redis-3.0.7/src/cluster.c : 5159
redis-3.0.7/src/hyperloglog.c : 1556
redis-3.0.7/src/notify.c : 130
redis-3.0.7/src/redis-cli.c : 2303
redis-3.0.7/src/t_list.c : 1119
redis-3.0.7/src/sparkline.h : 56
total line num = 56434 filenum = 91
總的核心代碼量大概接近6W。一樣值得咱們研讀。
Github主頁:https://github.com/ReactiveX/RxJava
RxJava/src/perf/java/rx/ObservablePerfBaseline.java : 82
RxJava/src/perf/java/rx/SinglePerfBaseline.java : 100
RxJava/src/main/java/rx/Subscriber.java : 215
RxJava/src/main/java/rx/SingleSubscriber.java : 85
RxJava/src/main/java/rx/Subscription.java : 45
RxJava/src/main/java/rx/Observer.java : 63
RxJava/src/main/java/rx/package-info.java : 44
RxJava/src/main/java/rx/Scheduler.java : 152
RxJava/src/main/java/rx/Single.java : 1901
RxJava/src/main/java/rx/Producer.java : 42
RxJava/src/main/java/rx/Observable.java : 10080
RxJava/src/main/java/rx/Notification.java : 212
RxJava/src/perf/java/rx/subjects/ReplaySubjectPerf.java : 119
RxJava/src/perf/java/rx/operators/OperatorFlatMapPerf.java : 103
RxJava/src/perf/java/rx/operators/FromIterablePerf.java : 85
RxJava/src/perf/java/rx/operators/OperatorMergePerf.java : 169
RxJava/src/perf/java/rx/operators/OperatorPublishPerf.java : 135
RxJava/src/perf/java/rx/operators/OperatorSerializePerf.java : 135
RxJava/src/perf/java/rx/operators/OperatorMapPerf.java : 69
RxJava/src/perf/java/rx/operators/OperatorObserveOnPerf.java : 91
RxJava/src/perf/java/rx/operators/OperatorRangePerf.java : 122
RxJava/src/perf/java/rx/operators/OperatorTakeLastOnePerf.java : 39
RxJava/src/perf/java/rx/schedulers/IOSchedulerPerf.java : 62
RxJava/src/perf/java/rx/schedulers/ComputationSchedulerPerf.java : 62
RxJava/src/perf/java/rx/internal/IndexedRingBufferPerf.java : 66
RxJava/src/perf/java/rx/internal/RxRingBufferPerf.java : 141
RxJava/src/perf/java/rx/internal/AtomicPerf.java : 280
RxJava/src/perf/java/rx/jmh/LatchedObserver.java : 48
RxJava/src/perf/java/rx/jmh/InputWithIncrementingInteger.java : 128
RxJava/src/perf/java/rx/subscriptions/SubscriptionListPerf.java : 89
RxJava/src/perf/java/rx/subscriptions/SubscriptionListConcurrentPerf.java : 131
RxJava/src/perf/java/rx/subscriptions/CompositeSubscriptionPerf.java : 118
RxJava/src/perf/java/rx/subscriptions/CompositeSubscriptionConcurrentPerf.java : 198
RxJava/src/perf/java/rx/subscriptions/SerialSubscriptionPerf.java : 86
RxJava/src/perf/java/rx/subscriptions/MultipleAssignmentSubscriptionPerf.java : 86
RxJava/src/perf/java/rx/observables/MultiInput.java : 36
RxJava/src/perf/java/rx/observables/BlockingObservablePerf.java : 47
RxJava/src/perf/java/rx/observables/SingleInput.java : 36
RxJava/src/perf/java/rx/observables/SyncOnSubscribePerf.java : 118
RxJava/src/main/java/rx/subjects/TestSubject.java : 175
RxJava/src/main/java/rx/subjects/SerializedSubject.java : 143
RxJava/src/main/java/rx/subjects/SubjectSubscriptionManager.java : 341
RxJava/src/main/java/rx/subjects/BehaviorSubject.java : 257
RxJava/src/main/java/rx/subjects/PublishSubject.java : 202
RxJava/src/main/java/rx/subjects/Subject.java : 174
RxJava/src/main/java/rx/subjects/ReplaySubject.java : 1171
RxJava/src/main/java/rx/subjects/AsyncSubject.java : 226
RxJava/src/main/java/rx/annotations/Beta.java : 51
RxJava/src/main/java/rx/annotations/Experimental.java : 41
RxJava/src/main/java/rx/plugins/RxJavaErrorHandler.java : 107
RxJava/src/main/java/rx/plugins/RxJavaPlugins.java : 214
RxJava/src/main/java/rx/plugins/RxJavaObservableExecutionHookDefault.java : 29
RxJava/src/main/java/rx/plugins/RxJavaObservableExecutionHook.java : 121
RxJava/src/main/java/rx/plugins/RxJavaSchedulersHook.java : 85
RxJava/src/main/java/rx/observers/Observers.java : 191
RxJava/src/main/java/rx/observers/SerializedSubscriber.java : 97
RxJava/src/main/java/rx/observers/Subscribers.java : 239
RxJava/src/main/java/rx/observers/TestObserver.java : 180
RxJava/src/main/java/rx/observers/SerializedObserver.java : 185
RxJava/src/main/java/rx/observers/SafeSubscriber.java : 213
RxJava/src/main/java/rx/observers/TestSubscriber.java : 506
RxJava/src/main/java/rx/schedulers/ImmediateScheduler.java : 74
RxJava/src/main/java/rx/schedulers/Schedulers.java : 189
RxJava/src/main/java/rx/schedulers/TrampolineScheduler.java : 135
RxJava/src/main/java/rx/schedulers/TimeInterval.java : 96
RxJava/src/main/java/rx/schedulers/CachedThreadScheduler.java : 237
RxJava/src/main/java/rx/schedulers/ExecutorScheduler.java : 179
RxJava/src/main/java/rx/schedulers/package-info.java : 19
RxJava/src/main/java/rx/schedulers/SleepingAction.java : 55
RxJava/src/main/java/rx/schedulers/TestScheduler.java : 180
RxJava/src/main/java/rx/schedulers/Timestamped.java : 86
RxJava/src/main/java/rx/schedulers/NewThreadScheduler.java : 43
RxJava/src/main/java/rx/subscriptions/Subscriptions.java : 135
RxJava/src/main/java/rx/subscriptions/BooleanSubscription.java : 77
RxJava/src/main/java/rx/subscriptions/RefCountSubscription.java : 147
RxJava/src/main/java/rx/subscriptions/MultipleAssignmentSubscription.java : 104
RxJava/src/main/java/rx/subscriptions/CompositeSubscription.java : 168
RxJava/src/main/java/rx/subscriptions/SerialSubscription.java : 105
RxJava/src/main/java/rx/observables/AsyncOnSubscribe.java : 663
RxJava/src/main/java/rx/observables/AbstractOnSubscribe.java : 625
RxJava/src/main/java/rx/observables/SyncOnSubscribe.java : 473
RxJava/src/main/java/rx/observables/ConnectableObservable.java : 134
RxJava/src/main/java/rx/observables/GroupedObservable.java : 105
RxJava/src/main/java/rx/observables/BlockingObservable.java : 700
RxJava/src/main/java/rx/exceptions/OnCompletedFailedException.java : 29
RxJava/src/main/java/rx/exceptions/OnErrorNotImplementedException.java : 58
RxJava/src/main/java/rx/exceptions/MissingBackpressureException.java : 58
RxJava/src/main/java/rx/exceptions/OnErrorFailedException.java : 50
RxJava/src/main/java/rx/exceptions/OnErrorThrowable.java : 197
RxJava/src/main/java/rx/exceptions/UnsubscribeFailedException.java : 30
RxJava/src/main/java/rx/exceptions/Exceptions.java : 206
RxJava/src/main/java/rx/exceptions/CompositeException.java : 266
RxJava/src/main/java/rx/functions/Action1.java : 23
RxJava/src/main/java/rx/functions/Action0.java : 23
RxJava/src/main/java/rx/functions/Actions.java : 432
RxJava/src/main/java/rx/functions/Action2.java : 23
RxJava/src/main/java/rx/functions/ActionN.java : 23
RxJava/src/main/java/rx/functions/FuncN.java : 23
RxJava/src/main/java/rx/functions/Func0.java : 26
RxJava/src/main/java/rx/functions/Action6.java : 24
RxJava/src/main/java/rx/functions/Func2.java : 23
RxJava/src/main/java/rx/functions/Func4.java : 23
RxJava/src/main/java/rx/functions/Action7.java : 23
RxJava/src/main/java/rx/functions/Action5.java : 24
RxJava/src/main/java/rx/functions/Func1.java : 23
RxJava/src/main/java/rx/functions/Action3.java : 23
RxJava/src/main/java/rx/functions/Func3.java : 23
RxJava/src/main/java/rx/functions/Functions.java : 333
RxJava/src/main/java/rx/functions/Action9.java : 23
RxJava/src/main/java/rx/functions/Func9.java : 23
RxJava/src/main/java/rx/functions/Func5.java : 23
RxJava/src/main/java/rx/functions/Func7.java : 23
RxJava/src/main/java/rx/functions/Action8.java : 23
RxJava/src/main/java/rx/functions/Func6.java : 23
RxJava/src/main/java/rx/functions/Function.java : 25
RxJava/src/main/java/rx/functions/Func8.java : 23
RxJava/src/main/java/rx/functions/Action4.java : 24
RxJava/src/main/java/rx/functions/Action.java : 25
RxJava/src/main/java/rx/internal/operators/OperatorDistinct.java : 83
RxJava/src/main/java/rx/internal/operators/OperatorTakeUntilPredicate.java : 98
RxJava/src/main/java/rx/internal/operators/OperatorTakeTimed.java : 84
RxJava/src/main/java/rx/internal/operators/OperatorTimeout.java : 59
RxJava/src/main/java/rx/internal/operators/OperatorMapPair.java : 95
RxJava/src/main/java/rx/internal/operators/OperatorTakeLastOne.java : 174
RxJava/src/main/java/rx/internal/operators/TakeLastQueueProducer.java : 128
RxJava/src/main/java/rx/internal/operators/OperatorWindowWithSize.java : 263
RxJava/src/main/java/rx/internal/operators/OnSubscribeFromIterable.java : 139
RxJava/src/main/java/rx/internal/operators/OperatorCast.java : 57
RxJava/src/main/java/rx/internal/operators/NotificationLite.java : 246
RxJava/src/main/java/rx/internal/operators/OperatorSwitchIfEmpty.java : 125
RxJava/src/main/java/rx/internal/operators/OperatorWindowWithObservable.java : 295
RxJava/src/main/java/rx/internal/operators/OnSubscribeTimerPeriodically.java : 64
RxJava/src/main/java/rx/internal/operators/OperatorAsObservable.java : 46
RxJava/src/main/java/rx/internal/operators/OperatorWindowWithTime.java : 499
RxJava/src/main/java/rx/internal/operators/OperatorFinally.java : 68
RxJava/src/main/java/rx/internal/operators/OperatorSkipUntil.java : 92
RxJava/src/main/java/rx/internal/operators/OnSubscribeAmb.java : 445
RxJava/src/main/java/rx/internal/operators/OperatorSkipLast.java : 79
RxJava/src/main/java/rx/internal/operators/OperatorMap.java : 64
RxJava/src/main/java/rx/internal/operators/OperatorMaterialize.java : 168
RxJava/src/main/java/rx/internal/operators/OnSubscribeDefer.java : 54
RxJava/src/main/java/rx/internal/operators/OperatorZipIterable.java : 79
RxJava/src/main/java/rx/internal/operators/OperatorScan.java : 375
RxJava/src/main/java/rx/internal/operators/OperatorBufferWithSize.java : 235
RxJava/src/main/java/rx/internal/operators/BlockingOperatorNext.java : 191
RxJava/src/main/java/rx/internal/operators/OperatorSampleWithTime.java : 112
RxJava/src/main/java/rx/internal/operators/OperatorMapNotification.java : 249
RxJava/src/main/java/rx/internal/operators/OnSubscribeTimerOnce.java : 59
RxJava/src/main/java/rx/internal/operators/OperatorConcat.java : 233
RxJava/src/main/java/rx/internal/operators/OperatorSerialize.java : 58
RxJava/src/main/java/rx/internal/operators/OperatorDoOnSubscribe.java : 45
RxJava/src/main/java/rx/internal/operators/OperatorToMultimap.java : 142
RxJava/src/main/java/rx/internal/operators/OperatorSequenceEqual.java : 89
RxJava/src/main/java/rx/internal/operators/OperatorSampleWithObservable.java : 95
RxJava/src/main/java/rx/internal/operators/OperatorOnBackpressureDrop.java : 95
RxJava/src/main/java/rx/internal/operators/CachedObservable.java : 455
RxJava/src/main/java/rx/internal/operators/OperatorAll.java : 78
RxJava/src/main/java/rx/internal/operators/OperatorGroupBy.java : 429
RxJava/src/main/java/rx/internal/operators/OnSubscribeToObservableFuture.java : 99
RxJava/src/main/java/rx/internal/operators/OperatorTakeWhile.java : 93
RxJava/src/main/java/rx/internal/operators/OperatorBufferWithSingleObservable.java : 193
RxJava/src/main/java/rx/internal/operators/OperatorTimeoutWithSelector.java : 112
RxJava/src/main/java/rx/internal/operators/OperatorZip.java : 338
RxJava/src/main/java/rx/internal/operators/OperatorBufferWithStartEndObservable.java : 218
RxJava/src/main/java/rx/internal/operators/OperatorUnsubscribeOn.java : 78
RxJava/src/main/java/rx/internal/operators/OperatorWindowWithObservableFactory.java : 320
RxJava/src/main/java/rx/internal/operators/OnSubscribeRefCount.java : 168
RxJava/src/main/java/rx/internal/operators/OperatorDebounceWithTime.java : 182
RxJava/src/main/java/rx/internal/operators/OperatorSkipLastTimed.java : 79
RxJava/src/main/java/rx/internal/operators/OperatorOnErrorReturn.java : 111
RxJava/src/main/java/rx/internal/operators/OperatorTakeUntil.java : 97
RxJava/src/main/java/rx/internal/operators/OperatorReplay.java : 1194
RxJava/src/main/java/rx/internal/operators/OperatorTimeoutBase.java : 177
RxJava/src/main/java/rx/internal/operators/BlockingOperatorMostRecent.java : 129
RxJava/src/main/java/rx/internal/operators/OperatorTakeLast.java : 82
RxJava/src/main/java/rx/internal/operators/OperatorToMap.java : 109
RxJava/src/main/java/rx/internal/operators/OperatorTimeInterval.java : 60
RxJava/src/main/java/rx/internal/operators/BackpressureUtils.java : 106
RxJava/src/main/java/rx/internal/operators/OperatorOnErrorResumeNextViaObservable.java : 104
RxJava/src/main/java/rx/internal/operators/OperatorElementAt.java : 117
RxJava/src/main/java/rx/internal/operators/OperatorSwitch.java : 291
RxJava/src/main/java/rx/internal/operators/OnSubscribeFromCallable.java : 38
RxJava/src/main/java/rx/internal/operators/OperatorTake.java : 136
RxJava/src/main/java/rx/internal/operators/OnSubscribeRedo.java : 372
RxJava/src/main/java/rx/internal/operators/OnSubscribeUsing.java : 136
RxJava/src/main/java/rx/internal/operators/OnSubscribeDelaySubscription.java : 59
RxJava/src/main/java/rx/internal/operators/OperatorDistinctUntilChanged.java : 87
RxJava/src/main/java/rx/internal/operators/OperatorIgnoreElements.java : 60
RxJava/src/main/java/rx/internal/operators/OperatorWindowWithStartEndObservable.java : 240
RxJava/src/main/java/rx/internal/operators/BlockingOperatorToIterator.java : 134
RxJava/src/main/java/rx/internal/operators/OnSubscribeGroupJoin.java : 381
RxJava/src/main/java/rx/internal/operators/OperatorDelay.java : 101
RxJava/src/main/java/rx/internal/operators/OperatorSingle.java : 144
RxJava/src/main/java/rx/internal/operators/OperatorToObservableSortedList.java : 119
RxJava/src/main/java/rx/internal/operators/OnSubscribeDelaySubscriptionWithSelector.java : 66
RxJava/src/main/java/rx/internal/operators/OperatorDebounceWithSelector.java : 108
RxJava/src/main/java/rx/internal/operators/OnSubscribeSingle.java : 89
RxJava/src/main/java/rx/internal/operators/OperatorObserveOn.java : 258
RxJava/src/main/java/rx/internal/operators/OperatorOnBackpressureBuffer.java : 172
RxJava/src/main/java/rx/internal/operators/OperatorOnErrorResumeNextViaFunction.java : 126
RxJava/src/main/java/rx/internal/operators/OperatorThrottleFirst.java : 68
RxJava/src/main/java/rx/internal/operators/BlockingOperatorToFuture.java : 137
RxJava/src/main/java/rx/internal/operators/OperatorTimestamp.java : 61
RxJava/src/main/java/rx/internal/operators/OperatorOnExceptionResumeNextViaObservable.java : 113
RxJava/src/main/java/rx/internal/operators/OperatorDoOnUnsubscribe.java : 47
RxJava/src/main/java/rx/internal/operators/OperatorDelayWithSelector.java : 81
RxJava/src/main/java/rx/internal/operators/OperatorSkip.java : 70
RxJava/src/main/java/rx/internal/operators/OperatorTakeLastTimed.java : 110
RxJava/src/main/java/rx/internal/operators/OnSubscribeJoin.java : 321
RxJava/src/main/java/rx/internal/operators/OperatorSkipWhile.java : 73
RxJava/src/main/java/rx/internal/operators/OperatorBufferWithTime.java : 309
RxJava/src/main/java/rx/internal/operators/OnSubscribeRange.java : 134
RxJava/src/main/java/rx/internal/operators/OperatorMulticast.java : 154
RxJava/src/main/java/rx/internal/operators/OperatorAny.java : 86
RxJava/src/main/java/rx/internal/operators/OperatorDoOnEach.java : 89
RxJava/src/main/java/rx/internal/operators/OperatorEagerConcatMap.java : 308
RxJava/src/main/java/rx/internal/operators/OperatorFilter.java : 67
RxJava/src/main/java/rx/internal/operators/BufferUntilSubscriber.java : 215
RxJava/src/main/java/rx/internal/operators/OperatorDematerialize.java : 87
RxJava/src/main/java/rx/internal/operators/OperatorRetryWithPredicate.java : 139
RxJava/src/main/java/rx/internal/operators/OnSubscribeAutoConnect.java : 57
RxJava/src/main/java/rx/internal/operators/OperatorDoOnRequest.java : 81
RxJava/src/main/java/rx/internal/operators/OperatorMerge.java : 827
RxJava/src/main/java/rx/internal/operators/OperatorSkipTimed.java : 80
RxJava/src/main/java/rx/internal/operators/OperatorSubscribeOn.java : 110
RxJava/src/main/java/rx/internal/operators/OperatorToObservableList.java : 115
RxJava/src/main/java/rx/internal/operators/OperatorOnBackpressureBlock.java : 95
RxJava/src/main/java/rx/internal/operators/OperatorPublish.java : 762
RxJava/src/main/java/rx/internal/schedulers/SchedulerLifecycle.java : 20
RxJava/src/main/java/rx/internal/schedulers/NewThreadWorker.java : 290
RxJava/src/main/java/rx/internal/schedulers/GenericScheduledExecutorService.java : 102
RxJava/src/main/java/rx/internal/schedulers/EventLoopsScheduler.java : 183
RxJava/src/main/java/rx/internal/schedulers/ScheduledAction.java : 202
RxJava/src/main/java/rx/internal/producers/ProducerObserverArbiter.java : 280
RxJava/src/main/java/rx/internal/producers/SingleDelayedProducer.java : 113
RxJava/src/main/java/rx/internal/producers/QueuedValueProducer.java : 136
RxJava/src/main/java/rx/internal/producers/SingleProducer.java : 78
RxJava/src/main/java/rx/internal/producers/ProducerArbiter.java : 191
RxJava/src/main/java/rx/internal/producers/QueuedProducer.java : 185
RxJava/src/main/java/rx/internal/util/SubscriptionRandomList.java : 155
RxJava/src/main/java/rx/internal/util/FrontPadding.java : 31
RxJava/src/main/java/rx/internal/util/PaddedAtomicInteger.java : 30
RxJava/src/main/java/rx/internal/util/SubscriptionIndexedRingBuffer.java : 145
RxJava/src/main/java/rx/internal/util/ObjectPool.java : 152
RxJava/src/main/java/rx/internal/util/ScalarSynchronousObservable.java : 151
RxJava/src/main/java/rx/internal/util/LinkedArrayList.java : 136
RxJava/src/main/java/rx/internal/util/BackpressureDrainManager.java : 240
RxJava/src/main/java/rx/internal/util/SynchronizedQueue.java : 168
RxJava/src/main/java/rx/internal/util/UtilityFunctions.java : 163
RxJava/src/main/java/rx/internal/util/IndexedRingBuffer.java : 536
RxJava/src/main/java/rx/internal/util/PaddedAtomicIntegerBase.java : 84
RxJava/src/main/java/rx/internal/util/SubscriptionList.java : 157
RxJava/src/main/java/rx/internal/util/RxRingBuffer.java : 457
RxJava/src/main/java/rx/internal/util/PlatformDependent.java : 89
RxJava/src/main/java/rx/internal/util/RxJavaPluginUtils.java : 40
RxJava/src/main/java/rx/internal/util/RxThreadFactory.java : 37
RxJava/src/main/java/rx/internal/util/SynchronizedSubscription.java : 35
RxJava/src/main/java/rx/internal/util/unsafe/SpscArrayQueue.java : 182
RxJava/src/main/java/rx/internal/util/unsafe/SpscLinkedQueue.java : 108
RxJava/src/main/java/rx/internal/util/unsafe/MpmcArrayQueue.java : 238
RxJava/src/main/java/rx/internal/util/unsafe/Pow2.java : 44
RxJava/src/main/java/rx/internal/util/unsafe/MessagePassingQueue.java : 74
RxJava/src/main/java/rx/internal/util/unsafe/ConcurrentCircularArrayQueue.java : 186
RxJava/src/main/java/rx/internal/util/unsafe/UnsafeAccess.java : 108
RxJava/src/main/java/rx/internal/util/unsafe/SpmcArrayQueue.java : 213
RxJava/src/main/java/rx/internal/util/unsafe/ConcurrentSequencedCircularArrayQueue.java : 58
RxJava/src/main/java/rx/internal/util/unsafe/MpscLinkedQueue.java : 136
RxJava/src/main/java/rx/internal/util/unsafe/BaseLinkedQueue.java : 126
RxJava/src/main/java/rx/internal/util/atomic/LinkedQueueNode.java : 57
RxJava/src/main/java/rx/internal/util/atomic/BaseLinkedAtomicQueue.java : 93
RxJava/src/main/java/rx/internal/util/atomic/MpscLinkedAtomicQueue.java : 126
RxJava/src/main/java/rx/internal/util/atomic/SpscLinkedAtomicQueue.java : 106
RxJava/src/main/java/rx/internal/util/atomic/SpscLinkedArrayQueue.java : 356
total line num = 53038 filenum = 273
這個項目中,對Java範型的應用真是出神入化,真的很值得一讀。
項目主頁:http://www.stunprotocol.org/
stunserver,即STUNTMAN。這是一個STUN協議Server端的實現。如這個項目的主頁中的說明,這個項目大概實現了5389,5769和5780這樣幾個RFC標準。
total line num = 11544 filenum = 64
代碼量也不是很大。
Github主頁:https://github.com/coturn/coturn/
這個項目對於STUN/TURN/ICE等相關用於P2P系統的便準的實現比較齊全,於是代碼量也略大。
coturn/src/ns_turn_defs.h : 254
coturn/src/server/ns_turn_maps.c : 1203
coturn/src/server/ns_turn_server.c : 4889
coturn/src/server/ns_turn_ioalib.h : 294
coturn/src/server/ns_turn_khash.h : 391
coturn/src/server/ns_turn_maps.h : 269
coturn/src/server/ns_turn_maps_rtcp.h : 81
coturn/src/server/ns_turn_maps_rtcp.c : 260
coturn/src/server/ns_turn_allocation.h : 237
coturn/src/server/ns_turn_allocation.c : 761
coturn/src/server/ns_turn_session.h : 176
coturn/src/server/ns_turn_server.h : 233
coturn/src/client++/TurnMsgLib.h : 1197
coturn/src/client/ns_turn_ioaddr.h : 108
coturn/src/client/ns_turn_msg_addr.h : 51
coturn/src/client/ns_turn_msg_defs_experimental.h : 57
coturn/src/client/ns_turn_msg_addr.c : 183
coturn/src/client/ns_turn_ioaddr.c : 551
coturn/src/client/ns_turn_msg.c : 2593
coturn/src/client/ns_turn_msg_defs.h : 266
coturn/src/client/ns_turn_msg.h : 228
coturn/src/apps/common/ns_turn_utils.c : 894
coturn/src/apps/common/hiredis_libevent2.h : 67
coturn/src/apps/common/ns_turn_utils.h : 89
coturn/src/apps/common/hiredis_libevent2.c : 385
coturn/src/apps/common/apputils.h : 249
coturn/src/apps/common/apputils.c : 1137
coturn/src/apps/common/stun_buffer.h : 132
coturn/src/apps/common/stun_buffer.c : 253
coturn/src/apps/uclient/startuclient.h : 87
coturn/src/apps/uclient/startuclient.c : 1629
coturn/src/apps/uclient/uclient.c : 1714
coturn/src/apps/uclient/mainuclient.c : 567
coturn/src/apps/uclient/session.h : 137
coturn/src/apps/uclient/uclient.h : 122
coturn/src/apps/relay/http_server.c : 379
coturn/src/apps/relay/ns_sm.h : 66
coturn/src/apps/relay/userdb.c : 1311
coturn/src/apps/relay/turn_admin_server.c : 3667
coturn/src/apps/relay/userdb.h : 223
coturn/src/apps/relay/turn_admin_server.h : 115
coturn/src/apps/relay/libtelnet.h : 677
coturn/src/apps/relay/mainrelay.c : 2673
coturn/src/apps/relay/tls_listener.c : 362
coturn/src/apps/relay/turn_ports.h : 73
coturn/src/apps/relay/ns_ioalib_impl.h : 322
coturn/src/apps/relay/libtelnet.c : 1545
coturn/src/apps/relay/turn_ports.c : 417
coturn/src/apps/relay/dtls_listener.h : 72
coturn/src/apps/relay/tls_listener.h : 63
coturn/src/apps/relay/http_server.h : 96
coturn/src/apps/relay/mainrelay.h : 366
coturn/src/apps/relay/dtls_listener.c : 1014
coturn/src/apps/relay/netengine.c : 1881
coturn/src/apps/relay/ns_ioalib_engine_impl.c : 3786
coturn/src/apps/rfc5769/rfc5769check.c : 573
coturn/src/apps/peer/udpserver.c : 172
coturn/src/apps/peer/mainudpserver.c : 102
coturn/src/apps/peer/udpserver.h : 76
coturn/src/apps/stunclient/stunclient.c : 466
coturn/src/apps/relay/dbdrivers/dbdriver.h : 92
coturn/src/apps/relay/dbdrivers/dbd_mongo.c : 1394
coturn/src/apps/relay/dbdrivers/dbd_mongo.h : 49
coturn/src/apps/relay/dbdrivers/dbd_mysql.c : 1261
coturn/src/apps/relay/dbdrivers/dbd_sqlite.h : 49
coturn/src/apps/relay/dbdrivers/dbd_redis.h : 49
coturn/src/apps/relay/dbdrivers/dbd_redis.c : 1392
coturn/src/apps/relay/dbdrivers/dbdriver.c : 113
coturn/src/apps/relay/dbdrivers/dbd_mysql.h : 49
coturn/src/apps/relay/dbdrivers/dbd_pgsql.h : 49
coturn/src/apps/relay/dbdrivers/dbd_pgsql.c : 994
coturn/src/apps/relay/dbdrivers/dbd_sqlite.c : 1341
total line num = 49073 filenum = 72
暫時想要好好研讀的項目主要便是這些。
Done。