<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>链接大全</title><link>http://blog.vckbase.com/bastet/category/604.html</link><description>链接大全</description><managingEditor>Diviner</managingEditor><dc:language>zh-CHS</dc:language><generator>.Text Version 0.958.2004.214</generator><item><dc:creator>Diviner</dc:creator><title>Notes on Richard Stevens' "Unix Network Programming, Volume 1"(ZT)</title><link>http://blog.vckbase.com/bastet/archive/2005/05/24/5726.html</link><pubDate>Tue, 24 May 2005 02:31:00 GMT</pubDate><guid>http://blog.vckbase.com/bastet/archive/2005/05/24/5726.html</guid><wfw:comment>http://blog.vckbase.com/bastet/comments/5726.html</wfw:comment><comments>http://blog.vckbase.com/bastet/archive/2005/05/24/5726.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.vckbase.com/bastet/comments/commentRss/5726.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/bastet/services/trackbacks/5726.html</trackback:ping><description>&lt;H1&gt;Notes on Richard Stevens' "Unix Network Programming, Volume 1"&lt;/H1&gt;We owe W. Richard Stevens quite a debt; his books are a great resource for Unix programmers. 
&lt;H2&gt;Resources at W. Richard Stevens' site&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.kohala.com/"&gt;www.kohala.com&lt;/A&gt; -- W. Richard Stevens' home page (and shrine) 
&lt;LI&gt;&lt;A href="http://www.kohala.com/start/unpv12e.html"&gt;www.kohala.com/start/unpv12e.html&lt;/A&gt; -- Home page for "Unix Network Programming, Volume 1" 
&lt;LI&gt;&lt;A href="http://www.kohala.com/start/unpv12e/unpv12e.tar.gz"&gt;www.kohala.com/start/unpv12e/unpv12e.tar.gz&lt;/A&gt; -- Source code for "Unix Network Programming, Volume 1" 
&lt;LI&gt;&lt;A href="http://www.kohala.com/start/unpv12e.problems.html"&gt;www.kohala.com/start/unpv12e.problems.html&lt;/A&gt; -- Reported problems building the above source. &lt;/LI&gt;&lt;/UL&gt;
&lt;H2&gt;Related Patches&lt;/H2&gt;Here are some patches and scripts I've put together which add support for Linux to some of the book's source code (notably to the benchmarks in chapter 27). 
&lt;P&gt;They can be downloaded as a tarball named unpv12ep (with a trailing p for 'patches', to distinguish it from the original): 
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.kegel.com/unpv1/unpv12ep-0.2.tar.gz"&gt;unpv12ep-0.2.tar.gz&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;or as individual files: 
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.kegel.com/unpv1/unpv12ep-0.2/unpv12e.tar.gz"&gt;unpv12e.tar.gz&lt;/A&gt; -- Richar Stevens' original tarball 
&lt;LI&gt;&lt;A href="http://www.kegel.com/unpv1/unpv12ep-0.2/build.sh"&gt;build.sh&lt;/A&gt; -- shell script to apply all patches and build (well, build the part I'm interested in, anyway) 
&lt;LI&gt;&lt;A href="http://www.kegel.com/unpv1/unpv12ep-0.2/test.sh"&gt;test.sh&lt;/A&gt; -- shell script to run server benchmarks to reproduce Stevens' figure 27.1 
&lt;LI&gt;&lt;A href="http://www.kegel.com/unpv1/unpv12ep-0.2/dodiff.sh"&gt;dodiff.sh&lt;/A&gt; -- shell script used to make patches by comparing book's original source code to local tree 
&lt;LI&gt;&lt;A href="http://www.kegel.com/unpv1/unpv12ep-0.2/clean.patch"&gt;clean.patch&lt;/A&gt; -- "make clean" and "make distclean" clean up better (useful when making patches) 
&lt;LI&gt;&lt;A href="http://www.kegel.com/unpv1/unpv12ep-0.2/pktinfo.patch"&gt;pktinfo.patch&lt;/A&gt; -- struct in_pktinfo from system headers now used if available 
&lt;LI&gt;&lt;A href="http://www.kegel.com/unpv1/unpv12ep-0.2/servmake.patch"&gt;servmake.patch&lt;/A&gt; -- build serv00 and serv09 by default 
&lt;LI&gt;&lt;A href="http://www.kegel.com/unpv1/unpv12ep-0.2/servrusage.patch"&gt;servrusage.patch&lt;/A&gt; -- work around broken getrusage on Linux 
&lt;LI&gt;&lt;A href="http://www.kegel.com/unpv1/unpv12ep-0.2/setpshared.patch"&gt;setpshared.patch&lt;/A&gt; -- programs that require _POSIX_THREAD_PROCESS_SHARED now fail at runtime rather than compile time on systems where that is not supported &lt;/LI&gt;&lt;/UL&gt;
&lt;H2&gt;Usage&lt;/H2&gt;To more or less reproduce figure 27.1 of "Unix Network Programming, Volume 1, 2nd edition" on Linux, download the above tarball, and do: &lt;PRE&gt;tar -xzvf unpv12ep-0.2.tar.gz
cd unpv12ep-0.2
sh build.sh
cd unpv12e/server
sh ../../test.sh PORT NITER
grep time *.out
&lt;/PRE&gt;where PORT is some port outside your local ephemeral IP port range, and NITER is just less than your local ephemeral IP port range divided by 10. 
&lt;P&gt;For instance, if /proc/sys/net/ipv4/ip_local_port_range is &lt;PRE&gt;  1024	32767
&lt;/PRE&gt;you'd want to set ITERS to 3000, and PORTNUM to e.g. 55000. You may want to increase your local port range to [1024,52000] so you can achieve longer run times and more accuracy. 
&lt;P&gt;
&lt;H2&gt;Preliminary results&lt;/H2&gt;The results listed below appear to be repeatable to about 10% accuracy. 
&lt;P&gt;On a Pentium III, 450 MHz, running Red Hat 6.2, client running on same machine as server, with 32000 local ports available, running &lt;PRE&gt;test.sh 3000 53000
&lt;/PRE&gt;yields &lt;PRE&gt;serv00: user time = 0.5, sys time = 5.0
serv01: user time = 3.7, sys time = 17.8
serv02: user time = 0.6, sys time = 7.1
serv03: user time = 0.8, sys time = 7.8
serv04: N/A (Linux doesn't support pthread_mutexattr_setpshared())
serv05: user time = 0.9, sys time = 6.4
serv06: N/A (Linux doesn't support process CPU time accounting for short-lived threads)
serv07: user time = 0.8, sys time = 7.1
serv08: user time = 1.0, sys time = 5.5
serv09: user time = 0.7, sys time = 7.3
&lt;/PRE&gt;
&lt;P&gt;On a dual Pentium III 650 MHz, booted with a non-SMP Red Hat 7.1, client running on same machine as server, with 51000 local ports available, running &lt;PRE&gt;test.sh 5000 53000
&lt;/PRE&gt;yields &lt;PRE&gt;serv00: user time = 0.3, sys time = 3.8
serv01: user time = 8.3, sys time = 35.1
serv02: user time = 0.5, sys time = 4.8
serv03: user time = 0.4, sys time = 5.5
serv04: N/A (Linux doesn't support pthread_mutexattr_setpshared())
serv05: user time = 0.8, sys time = 6.2
serv06: N/A (Linux doesn't support process CPU time accounting for short-lived threads)
serv07: user time = 0.9, sys time = 5.0
serv08: user time = 1.0, sys time = 5.5
serv09: user time = 0.6, sys time = 4.8
&lt;/PRE&gt;
&lt;P&gt;Same machine, same conditions except booted with a SMP red hat 7.1 kernel: &lt;PRE&gt;serv00: user time = 0.3, sys time = 8.2
serv01: user time = 9.9, sys time = 56.8
serv02: user time = 0.8, sys time = 9.9
serv03: user time = 0.6, sys time = 10.9
serv04: N/A (Linux doesn't support pthread_mutexattr_setpshared())
serv05: user time = 0.9, sys time = 11.9
serv06: N/A (Linux doesn't support process CPU time accounting for short-lived threads)
serv07: user time = 1.0, sys time = 10.5
serv08: user time = 1.2, sys time = 11.0
serv09: user time = 0.5, sys time = 9.8
&lt;/PRE&gt;
&lt;H2&gt;Issues&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;The SMP kernel has noticable overhead. I suppose that's expected. 
&lt;LI&gt;Linux has two pthreads compatibility problems that prevented me from running two of the programs: 
&lt;UL&gt;
&lt;LI&gt;Linux does not support pthread_mutexattr_setpshared() yet. 
&lt;LI&gt;Under Linux, getrusage(USAGE_CHILDREN, buf) does not yet report time spent by child threads created with pthread_create(). I was able to work around this for the servers that create long-lived threads with a kludge that reads child threads' cpu time from /proc (see getrusage_children.c), but this won't work well for short-lived threads (e.g. as used by program serv06.c). &lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;The above timings were measured with both client and server on a single machine, instead of running the clients on two separate machines, as in Stevens. This means the test can't run as long, as it runs out of local port numbers faster. I don't have a script for running client on separate machines yet. 
&lt;LI&gt;Output not normalized or presented the same way as in the book (I don't sum user and sys, and I don't subtract serv00's time from all results) 
&lt;LI&gt;Haven't verified that my patches don't break Solaris, BSD, or OSF/1 compatibility yet 
&lt;LI&gt;Stevens' example server/client.c uses gethostbyname() heavily; if you're not careful, this can make the program run very slowly. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Last updated: 22 Aug 2001 &lt;/P&gt;&lt;img src ="http://blog.vckbase.com/bastet/aggbug/5726.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Diviner</dc:creator><title>bs网上的资源转贴在这里</title><link>http://blog.vckbase.com/bastet/archive/2005/03/27/4080.html</link><pubDate>Sun, 27 Mar 2005 04:17:00 GMT</pubDate><guid>http://blog.vckbase.com/bastet/archive/2005/03/27/4080.html</guid><wfw:comment>http://blog.vckbase.com/bastet/comments/4080.html</wfw:comment><comments>http://blog.vckbase.com/bastet/archive/2005/03/27/4080.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.vckbase.com/bastet/comments/commentRss/4080.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/bastet/services/trackbacks/4080.html</trackback:ping><description>&lt;UL&gt;
&lt;LI&gt;A list of &lt;A href="http://www.research.att.com/~bs/applications.html"&gt;interesting C++ applications&lt;/A&gt;. I welcome suggestions for additions. 
&lt;LI&gt;An incomplete &lt;A href="http://www.research.att.com/~bs/compilers.html"&gt;list of C++ compilers&lt;/A&gt;. 
&lt;P&gt;&lt;/P&gt;
&lt;LI&gt;A list of available C++ libraries known as &lt;A href="http://www.trumphurst.com/cpplibs1.html"&gt;the C++ libraries FAQ&lt;/A&gt;. 
&lt;LI&gt;&lt;A href="http://www.boost.org/"&gt;Boost.org&lt;/A&gt;: A repository for libraries meant to work well with the C++ standard library. 
&lt;LI&gt;Doug Schmidt's site with information about a lot of things including &lt;A href="http://siesta.cs.wustl.edu/~schmidt/ACE.html"&gt;the ACE framework&lt;/A&gt; and &lt;A href="http://siesta.cs.wustl.edu/~schmidt/TAO.html"&gt;the TAO real-time ORB&lt;/A&gt;. 
&lt;LI&gt;AT&amp;amp;T Cambridge Laboratory's robust, reliable, efficient, open-source, CORBA2.1 compliant &lt;A href="http://www.uk.research.att.com/omniORB/omniORB.html"&gt;OmniORB&lt;/A&gt; (in C++ and supporting C++, of course :-). 
&lt;LI&gt;High-performance numerical libraries provide excellent tests for interesting new programming techniques: &lt;A href="http://www.oonumerics.org/oon"&gt;The Object-Oriented Numerics Page&lt;/A&gt; is a list of libraries, projects, and mailing lists. For example: &lt;A href="http://www.acl.lanl.gov/Pooma"&gt;POOMA&lt;/A&gt; from LANL, &lt;A href="http://oonumerics.org/blitz/"&gt;Blitz++&lt;/A&gt; from U. of Waterloo, &lt;A href="http://lsc.nd.edu/research/mtl"&gt;MTL&lt;/A&gt; from U. of Notre Dame, and &lt;A href="http://root.cern.ch/root"&gt;ROOT&lt;/A&gt; from CERN. Note that the POOMA project maintains &lt;A href="http://www.acl.lanl.gov/Pooma/html/compilers.html"&gt;a page listing compilers that are standards conforming enough for their advanced uses&lt;/A&gt;. All of these libraries are available for downloading. 
&lt;LI&gt;Hans-J. Boehm's &lt;A href="http://www.hpl.hp.com/personal/Hans_Boehm/gc/"&gt;site for C and C++ garbage collection&lt;/A&gt; and a couple of sites offering collectors based on his work (&lt;A href="http://www.yl.is.s.u-tokyo.ac.jp/gc/dgc.shtml"&gt;University of Tokyo&lt;/A&gt;, &lt;A href="http://www.geodesic.com/"&gt;geodesic.com&lt;/A&gt;). 
&lt;LI&gt;&lt;A href="http://www.jamesd.demon.co.uk/csc/faq.html"&gt;C++ Standards FAQ&lt;/A&gt; containing many valuable links (including some to implementations of the standard library). 
&lt;LI&gt;Several test suites are available for C++ (try looking for ``C++ test suite'' using your favorite search engine. For example, &lt;A href="http://www.plumhall.com/"&gt;Plumhall&lt;/A&gt; and &lt;A href="http://www.peren.com/pages/products.htm"&gt;Perennial&lt;/A&gt; sell extensive commercial standards conformance suites. 
&lt;P&gt;&lt;/P&gt;
&lt;LI&gt;An old, but unfortunately not completely irrelevant, net posting &lt;A href="http://www.research.att.com/~bs/blast.html"&gt;answering some unfair criticisms of C++&lt;/A&gt;. 
&lt;LI&gt;A net posting about &lt;A href="http://www.research.att.com/~bs/learn.html"&gt;how to approach learning C++&lt;/A&gt;. 
&lt;LI&gt;An ASCII version of the slides I used for &lt;A href="http://www.research.att.com/~bs/esc99.html"&gt;my keynote at the Spring'99 Embedded Systems Conference&lt;/A&gt;. 
&lt;P&gt;&lt;/P&gt;
&lt;LI&gt;Marshall Cline's &lt;A href="http://www.parashift.com/c++-faq-lite/"&gt;C++ FAQ&lt;/A&gt;. 
&lt;LI&gt;The &lt;A href="http://www.faqs.org/faqs/C-faq/learn"&gt;learn.c-c++ newsgroup FAQ&lt;/A&gt; presents much information of use for C and/or C++ novices. 
&lt;LI&gt;STL (Standard Template Library) &lt;A href="http://www.jamesd.demon.co.uk/csc/faq.html"&gt;FAQ&lt;/A&gt;. 
&lt;LI&gt;&lt;A href="http://www.sgi.com/tech/stl"&gt;SGI's implementation of the STL&lt;/A&gt;. 
&lt;LI&gt;&lt;A href="http://www.dinkumware.com/manuals/reader.aspx?lib=cpp"&gt;Dinkumware's&lt;/A&gt; online standard library reference. 
&lt;LI&gt;&lt;A href="http://www.roguewave.com/support/docs/sourcepro/stdlibug/index.html"&gt;Rogue Wave's&lt;/A&gt; online documentation of an commentary on the standard library. 
&lt;P&gt;&lt;/P&gt;
&lt;LI&gt;An extensive collection of book reviews can be found on &lt;A href="http://www.accu.org/"&gt;the ACCU (The Association of C and C++ Users) site&lt;/A&gt;. 
&lt;LI&gt;Sean Corfield's &lt;A href="http://www.corfield.org/index.php?event=cplusplus.main"&gt;site summarizing the changes from ARM C++ to Standard C++&lt;/A&gt;. 
&lt;LI&gt;David Tribble's &lt;A href="http://david.tribble.com/text/cdiffs.htm"&gt;paper listing incompatibilities between C++ and C99&lt;/A&gt;. 
&lt;LI&gt;A list of resources for people learning C++ from &lt;A href="http://www-h.eng.cam.ac.uk/help/tpl/languages/C++.html"&gt;The Cambridge University Engineering Department&lt;/A&gt;. 
&lt;LI&gt;A list of C++ resources such as &lt;A href="http://www.robertnz.com/cpp_site.html"&gt;libraries, implementations, books, FAQs, other C++ pages, etc.&lt;/A&gt;. 
&lt;P&gt;&lt;/P&gt;
&lt;LI&gt;A large (18,000+) collection of links to information on OO, OOP languages, etc. called &lt;A href="http://www.cetus-links.org/"&gt;Cetus&lt;/A&gt;. 
&lt;LI&gt;A page listing &lt;A href="http://www.geocities.com/SiliconValley/Vista/7184/guitool.html"&gt;numerous GUI toolkits&lt;/A&gt;. 
&lt;LI&gt;A catalog of &lt;A href="http://www.fz-juelich.de/zam/cxx/extern.html"&gt;C++ links&lt;/A&gt; from Forschungszentrum Julich. 
&lt;LI&gt;Addison-Wesley Longman's &lt;A href="http://www.awl.com/cseng/professional/resources.html"&gt;links to C++ and OOP resources&lt;/A&gt;. 
&lt;LI&gt;Greg Comeau's C++ related &lt;A href="http://www.comeaucomputing.com/"&gt;site in New York&lt;/A&gt;. 
&lt;LI&gt;Brad Appleton's collection of &lt;A href="http://www.enteract.com/~bradapp/"&gt;C++ and OOP links&lt;/A&gt;. 
&lt;LI&gt;&lt;A href="http://dmoz.org/Computers/Programming/Languages/C%2b%2b/"&gt;The C++ section&lt;/A&gt; of the open directory project. 
&lt;P&gt;&lt;/P&gt;
&lt;LI&gt;Herb Sutter's collection of &lt;A href="http://www.gotw.ca/"&gt;articles&lt;/A&gt; focussing on how to learn and use Standard C++ in a modern style. 
&lt;LI&gt;Kevlin Henneys' collection of &lt;A href="http://www.two-sdg.demon.co.uk/curbralan"&gt;thought provoking and useful articles&lt;/A&gt; about good C++ design and style. 
&lt;LI&gt;The &lt;A href="http://www.cuj.com/"&gt;C/C++ Users Journal&lt;/A&gt; has a changing collection of useful articles and links especially &lt;A href="http://www.cuj.com/experts/index.htm?topic=experts"&gt;the C++ Expert Forum&lt;/A&gt;. 
&lt;P&gt;&lt;/P&gt;
&lt;LI&gt;Several videos, audio recordings, and transcripts of talks, panels, and interviews from &lt;A href="http://technetcast.ddj.com/tnc_catalog.html?item_id=94"&gt;Dr. Dobb's Technetcast archieves&lt;/A&gt; featuring me. 
&lt;LI&gt;&lt;A href="http://cm.bell-labs.com/cm/cs/who/dmr/"&gt;Dennis Ritchie's homepage&lt;/A&gt; containing lots of interesting information about the history of C, Unix, and (AT&amp;amp;T) Bell Lab's computer science research center (where C++ was born). &lt;/LI&gt;
&lt;LI&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src ="http://blog.vckbase.com/bastet/aggbug/4080.html" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Diviner</dc:creator><title>一些没啥意义的连接：</title><link>http://blog.vckbase.com/bastet/archive/2005/02/27/3286.html</link><pubDate>Sun, 27 Feb 2005 01:04:00 GMT</pubDate><guid>http://blog.vckbase.com/bastet/archive/2005/02/27/3286.html</guid><wfw:comment>http://blog.vckbase.com/bastet/comments/3286.html</wfw:comment><comments>http://blog.vckbase.com/bastet/archive/2005/02/27/3286.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://blog.vckbase.com/bastet/comments/commentRss/3286.html</wfw:commentRss><trackback:ping>http://blog.vckbase.com/bastet/services/trackbacks/3286.html</trackback:ping><description>&lt;P&gt;forum.ragezone.com:这个网站有各种网游的介绍，主要是私服的架设，经常会有私服原代码下载。&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;plib.sf.net:基于ogl的3D库&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;新闻组服务器：news.cn99.com,msnews.microsoft.com,news.digitalmars.com&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;BUG跟踪系统：bugzilla,clearquest&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;一个C++的好多有用的库，包括线程，套接字(其他的我记不得了)：cplusplus.sf.net&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;UDP库(实现可靠UDP传输和一些常用的UDP所用的功能，如文件传输等等)：enet.cubik.org,raknet,opentnl&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;数据库读写：otl.sf.net,dtl.sf.net,libodbc++&lt;/P&gt;&lt;img src ="http://blog.vckbase.com/bastet/aggbug/3286.html" width = "1" height = "1" /&gt;</description></item></channel></rss>