View Single Post
  #1 (permalink)  
Old February 20th, 2002
Moak's Avatar
Moak Moak is offline
Guest
 
Join Date: September 7th, 2001
Location: Europe
Posts: 816
Moak is flying high
Default Question on Gnucleus socket Close()

Hi swabby,

what is the purpose of your extra code in the sockets Close() method? Would it make a difference if I leave it away?
I mean this code snippet:
Code:
	// Clean receive buffer
	int iRet = 0;
	byte pBuf[4096];	
	while( (iRet = Receive(pBuf, 4096)) > 0 );

	// Close socket
	AsyncSelect(0);
Mutella (a kind of Unix reincarnation) does something different:
Code:
	AsyncSelect(FD_CLOSE);
	ShutDown(2);
Thx for some helping words, Moak
Reply With Quote