[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] cross-platform udvikling (windows linux)



Peter Maersk-Moller wrote:

> Hej Björn
> 
> Björn Lundin wrote:
>> Peter Maersk-Moller wrote:
>>>En stor forskel er, at sockets på Windows
>>>skal initialiseres før brug - pffftttthhhtfhh !
>> Och stängas ner INNAN programmet avlutas...
> 
> Hvad sker der, hvis man ikke gør det ?
> 
> (ok - det er jo ikke Linux-specifikt, men det er godt at vide,
> når man laver cross-platform).
> 
> --PMM
> 

Du lämnar en 'system-wide' minneslucka. Det är inte mycket per gång, men en
process som skapar inte stänger socketanvändningen efter sig, och startas om
igen och igen... kommer till slut inte att få skapa nya socketar, och ingen
annan process heller, för den delen. Kolleger har råkat ut för det på en
driftsmaskin, boot enda lösningen :( Jag kommer inte ihåg det exakta
felmeddelandet, men det hade något att göra med 'slut på globala
systemresurer' att göra. Omskrivning, till att anropa wsacleanup löste
problemet... (Detta var på Nt4, men jag har inget större hopp om att det är
bättre nu)

se

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/wsacleanup_2.asp

Remarks
An application or DLL is required to perform a successful WSAStartup call
before it can use Windows Sockets services. When it has completed the use
of Windows Sockets, the application or DLL must call WSACleanup to
deregister itself from a Windows Sockets implementation and allow the
implementation to free any resources allocated on behalf of the application
or DLL.

-- 
/Björn
-------------------------------------------------------------------
http://lundin.homelinux.net
Registered Linux User No. 267342 <http://counter.li.org>


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *