home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / windows / winsock / programmer-faq
Encoding:
Internet Message Format  |  1999-07-20  |  10.7 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!news.kodak.com!news-nysernet-16.sprintlink.net!news-east1.sprintlink.net!news-peer1.sprintlink.net!news.sprintlink.net!howland.erols.net!dispose.news.demon.net!demon!newsfeed.icl.net!colt.net!news.belnet.be!news.tvd.be!feeder.nmix.net!198.59.136.4.MISMATCH!feeder.swcp.com!198.59.115.31.MISMATCH!news.cyberport.com!not-for-mail
  2. From: Warren Young <tangent@cyberport.com>
  3. Newsgroups: alt.winsock.programming,comp.os.ms-windows.programmer.tools.winsock,alt.answers,comp.answers,news.answers
  4. Subject: Winsock Programmer's FAQ (updated 1999.06.27)
  5. Followup-To: poster
  6. Date: 19 Jul 1999 16:28:53 GMT
  7. Organization: CyberPort Station
  8. Approved: news-answers-request@MIT.EDU
  9. Expires: Wed, 1 Sep 1999 00:00:00 GMT
  10. Message-ID: <7mvjo5$ctu$1@macaw.cyberport.com>
  11. NNTP-Posting-Host: 56k15-118.cyberport.com
  12. X-Trace: macaw.cyberport.com 932401733 13246 204.134.118.15 (19 Jul 1999 16:28:53 GMT)
  13. X-Complaints-To: abuse@cyberport.com
  14. NNTP-Posting-Date: 19 Jul 1999 16:28:53 GMT
  15. Summary: Announcement for the major Winsock programming newsgroups' FAQ.
  16. Lines: 220
  17. Xref: senator-bedfellow.mit.edu alt.winsock.programming:12573 comp.os.ms-windows.programmer.tools.winsock:11541 alt.answers:43233 comp.answers:36977 news.answers:162668
  18.  
  19. Archive-name: windows/winsock/programmer-faq
  20. Posting-Frequency: monthly (on or after the 19th)
  21. Last-modified: 1999/6/27
  22. URL: http://www.cyberport.com/~tangent/programming/winsock/
  23. Copyright: (c) 1997-1999 Warren Young
  24. Maintainer: Warren Young <tangent@cyberport.com>
  25. X-Disclaimer: Approval for *.answers is based on form, not content.
  26.  
  27. What Is The Winsock Programmer's FAQ?
  28. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29.     The Winsock Programmer's FAQ is a resurrected and expanded version
  30.     of the original Winsock FAQ by Mark Towfiq.  It is essentially
  31.     a new work, though certain elements of its predecessor are still
  32.     recognizable in the current FAQ.
  33.  
  34. Where Is The FAQ?
  35. ~~~~~~~~~~~~~~~~~
  36.     The online version of the FAQ is located at:
  37.  
  38.         http://www.cyberport.com/~tangent/programming/winsock/
  39.  
  40.     If you must read it offline, an archived version is kept at:
  41.  
  42.         http://www.cyberport.com/~tangent/programming/winsock/wskfaq.zip
  43.  
  44.     This latter is a zipped version of the complete FAQ, including
  45.     the graphics.  This archive is not kept strictly up to date.
  46.     I do try and rebuild it for every major update to the page, but I
  47.     make no guarantees.
  48.  
  49. What's New?
  50. ~~~~~~~~~~~
  51.     The past month's activity on the FAQ follows:
  52.  
  53.         1999.07.19 - Updated the new "raw socket capabilities"
  54.             table in item 3.1 with new information on what Windows
  55.             2000 will support.
  56.  
  57.         1999.06.27 - Improved item 2.15, regarding the best way to
  58.             send a broadcast packet.
  59.  
  60.             Changed item 3.17. It used to say that only buggy Winsock
  61.             stacks and LSPs limited the number of sockets per select()
  62.             to 64, but I've been reliably informed that at least one
  63.             respected Winsock vendor's stack behaves this way, and they
  64.             aren't willing to change it. So, the FAQ item now recommends
  65.             against trying to force your way past this limitation.
  66.  
  67.             Improved item 3.18, to note that its advice won't help work
  68.             around a certain Windows 9x bug, though it seems like it
  69.             should help.
  70.  
  71.             I just found out a way to get quasi-dup2() functionality
  72.             under Winsock. Thus, the BSD Compatibility and Question 3.3
  73.             items have been updated.
  74.  
  75.             Added item 3.21, to point people wanting to know about the
  76.             control bits in a TCP packet to the Debugging TCP tutorial
  77.             which covers this.
  78.  
  79.             Added item 2.17, regarding advice for choosing server ports.
  80.  
  81.     This summary excludes typo fixes and updates to the Resources section.
  82.  
  83. What Does The FAQ Want To Be When It Grows Up?
  84. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  85.     The FAQ's original focus was to attempt to answer all of the
  86.     common questions, like "how do I do a ping", and "where can I get
  87.     sample code".  However, the FAQ is growing into a general Winsock
  88.     programmer's resource for all levels of Winsock programmers, not
  89.     just beginners.
  90.  
  91.     The FAQ has a largish Resources section with links to code, company
  92.     web sites, freeware and shareware for Winsock programming, etc.
  93.  
  94.     The FAQ is also now branching out with longer articles.  Currently,
  95.     several tutorials exist, and more are on the way.  The Reviews
  96.     section is also under way, but I can think of many additions it needs,
  97.     mainly software.  (Software companies are welcome to email me with
  98.     proposals for reviewing relevant packages!)  Outside contributions
  99.     of tutorials and reviews are welcome.  See the following page under
  100.     Future Directions for more info:
  101.  
  102.         http://www.cyberport.com/~tangent/programming/winsock/intro.html
  103.  
  104.     If you have an idea for a new FAQ item, I definitely want to hear from
  105.     you.  I also welcome corrections and expansions to existing items.
  106.  
  107. The FAQ's Table of Contents
  108. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  109.     Section 0 - Introduction
  110.         0.1 - The Original Introduction
  111.         0.2 - A Bit About the Maintainer
  112.         0.3 - Legal Stuff
  113.         0.4 - Mirrors
  114.         0.5 - What if your question is not in the FAQ?
  115.         0.6 - Language Bias
  116.         0.7 - Acknowledgements
  117.  
  118.     Section 1 - General Winsock Information
  119.         1.1 - What is Winsock?
  120.         1.2 - What is the latest version?
  121.         1.3 - When is the next rev of the specification?
  122.         1.4 - Where can I get a Winsock implementation?
  123.         1.5 - Why isn't there just one Winsock DLL? Do I need a
  124.               network stack to use it?
  125.         1.6 - Is there a version of Winsock for { OS/2, DOS, UNIX,
  126.               etc. }?
  127.         1.7 - Can Winsock speak { DECNet, IPX/SPX, etc. }?
  128.         1.8 - What does Winsock 2 have that Winsock 1.1 doesn't?
  129.         1.9 - Where can I get Winsock 2?
  130.        
  131.     Section 2 - Issues for New Winsock Programmers
  132.         2.1 - Are there any sample apps on the Net?
  133.         2.2 - How do I speak { HTTP, POP3, SMTP, FTP, Telnet, NNTP, 
  134.               etc. } with Winsock?
  135.         2.3 - How do I get my IP address from within a Winsock
  136.               program?
  137.         2.4 - What kind of socket should I use?
  138.         2.5 - Do I need to initialize the WSAData structure before
  139.               calling WSAStartup?
  140.         2.6 - If I write a Winsock program, will I be able to
  141.               communicate with a UNIX Sockets program?
  142.         2.7 - Can I use Winsock with { Delphi, Visual Basic, Visual
  143.               COBOL, etc. }?
  144.         2.8 - How do I detect when my TCP connection is closed?
  145.         2.9 - Are there any tools available for debugging Winsock
  146.               programs?
  147.         2.10 - How do I get a readable error message from a Winsock
  148.               error number?
  149.         2.11 - Winsock keeps returning the error WSAEWOULDBLOCK.
  150.               What's wrong with my program?
  151.         2.12 - What's the proper way to close a socket?
  152.         2.13 - What can you tell me about MFC's CSocket and 
  153.               CAsyncSocket?
  154.         2.14 - How can I change the timeout for a Winsock function?
  155.         2.15 - How do I send a broadcast packet?
  156.         2.16 - How do I detect an abnormal network disconnect?
  157.        
  158.     Section 3 - Advanced Winsock Issues
  159.         3.1 - How can I open a raw data socket?
  160.         3.2 - How can I "ping" another machine with Winsock?
  161.         3.3 - How do I share a socket between two processes?
  162.         3.4 - How can I get access to the {route, ARP, interface, etc.}
  163.               table?
  164.         3.5 - How can I get the local username?
  165.         3.6 - Is it possible to create sockets that map to a DLL
  166.               rather than an application?
  167.         3.7 - I'm having trouble porting a BSD sockets program to
  168.               Winsock. Help!
  169.         3.8 - How do I get the MAC (a.k.a. hardware) address of the
  170.               local Ethernet adapter?
  171.         3.9 - In a multithreaded application, can more than one thread
  172.               access a single socket?
  173.         3.10 - If two threads in an application call recv() on a
  174.               socket, will they each get the same data?
  175.         3.11 - Is there any way for two threads to be notified when
  176.               something happens on a socket?
  177.         3.12 - How do I detect if the modem is connected?
  178.         3.13 - How can I capture packets on a LAN with Winsock?
  179.         3.14 - How can I change the IP or TCP header of a packet?
  180.         3.15 - When should I turn off the Nagle algorithm?
  181.         3.16 - How many simultaneous sockets can I have open with
  182.               Winsock?
  183.         3.17 - Can I change FD_SETSIZE to make select() wait on more
  184.               than 64 sockets?
  185.         3.18 - How do I make Winsock use a specific network interface 
  186.               to make a connection?
  187.         3.19 - How do I write my program to work through a firewall?
  188.         3.20 - Is it a bad idea to bind() to a particular port in a
  189.               client program?
  190.         
  191.     Section 4 - Resources
  192.         4.1 - Winsock Libraries and Controls
  193.         4.2 - Sample Winsock Applications and Tutorials
  194.         4.3 - Web Pages
  195.         4.4 - Winsock SDKs and Specifications
  196.         4.5 - Winsock Debugging Tools
  197.         4.6 - Network Suite Vendors
  198.         4.7 - Miscellaneous
  199.        
  200.     Section 5 - Examples
  201.         Example 1 - Getting the Local IP Address
  202.         Example 2 - Pinging a Host Using Microsoft's ICMP.DLL
  203.         Example 3 - Pinging a Host Using Raw Sockets
  204.         Example 4 - How to Get the Local User Name
  205.         Example 5 - How to Pass a Socket Handle in Win32
  206.         Example 6 - How to Get the MAC (a.k.a. "hardware") Address,
  207.               NetBIOS method
  208.         Example 7 - How to Get the MAC (a.k.a. "hardware") Address,
  209.               RPC method
  210.         Example 8 - Getting the Network Interface List
  211.         Example 9 - Finding the Maximum Number of Open Sockets
  212.         Example 10 - Several Basic Winsock Programs
  213.        
  214.     Section 6 - Tutorials
  215.         Tutorial 1 - What Kind of Socket Should I Use?
  216.         Tutorial 2 - Winsock for the Impatient
  217.         Tutorial 3 - Winsock's Compatibility With BSD Sockets
  218.         Tutorial 4 - Why Does Winsock Keep Corrupting My Data?
  219.         Tutorial 5 - Debugging TCP
  220.         Tutorial 6 - The Lame List
  221.  
  222.     Section 7 - Reviews
  223.         Books
  224.             Win32 Network Programming by Ralph Davis
  225.             WinSock 2.0 by Lewis Napper
  226.             Windows Sockets Network Programming by Bob Quinn and Dave Shute
  227.             TCP/IP Illustrated, volume 1 by W. Richard Stevens
  228.             UNIX Network Programming, volume 1 by W. Richard Stevens
  229.  
  230.         Software
  231.             Nothing yet! 
  232.        
  233.    Section 8 - Glossary
  234.  
  235. --
  236. Warren Young -- Maintainer of The Winsock Programmer's FAQ
  237. Please, do not send unsolicited commercial email.
  238.  
  239.