[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]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
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>
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |