Article View: borland.public.cppbuilder.internet.socket
Article #1253Re: WSAStartup with threads
From: Remy Lebeau (TeamB)
Date: Sat, 24 Feb 2007 00:42
Date: Sat, 24 Feb 2007 00:42
15 lines
1410 bytes
1410 bytes
"Eduardo Jauch" <eduardo.jauch@gmail.com> wrote in message news:45df74be@newsgroups.borland.com... > If i have a program with the habilit to create various threads to > connect to a site via socket (same or different sites), I need to > use WSAStartup in every one of them or on the main program? It doesn't really matter, as WinSock is reference counted. Calling WSAStartup() and WSACleanup() in each thread will not hurt anything. Only the first call to WSAStartup() and the last call to WSACleanup() are important. The rest are just adjusting the reference count. Gambit
Technical Details
Message-ID:
<45df89da@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45df74be@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,e3da03796ce7adb8 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <45df74be@newsgroups.borland.com> Subject: Re: WSAStartup with threads Date: Fri, 23 Feb 2007 16:42:27 -0800 Lines: 17 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 75.83.34.171 Message-ID: <45df89da@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1172277722 75.83.34.171 (23 Feb 2007 16:42:02 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail