<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://spectrum.alioth.net/doc/index.php?action=history&amp;feed=atom&amp;title=Close</id>
	<title>Close - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://spectrum.alioth.net/doc/index.php?action=history&amp;feed=atom&amp;title=Close"/>
	<link rel="alternate" type="text/html" href="https://spectrum.alioth.net/doc/index.php?title=Close&amp;action=history"/>
	<updated>2026-04-23T18:15:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://spectrum.alioth.net/doc/index.php?title=Close&amp;diff=147&amp;oldid=prev</id>
		<title>Winston: New page: '''close, sockclose (HLCALL 0x3E03)''' - close a socket  == Synopsis ==  ''Assembly language''       ld a, (v_sockfd)      ld hl, CLOSE      call HLCALL  ''C''       #include &lt;sys/socket.h...</title>
		<link rel="alternate" type="text/html" href="https://spectrum.alioth.net/doc/index.php?title=Close&amp;diff=147&amp;oldid=prev"/>
		<updated>2008-08-16T11:52:18Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;#039;&amp;#039;&amp;#039;close, sockclose (HLCALL 0x3E03)&amp;#039;&amp;#039;&amp;#039; - close a socket  == Synopsis ==  &amp;#039;&amp;#039;Assembly language&amp;#039;&amp;#039;       ld a, (v_sockfd)      ld hl, CLOSE      call HLCALL  &amp;#039;&amp;#039;C&amp;#039;&amp;#039;       #include &amp;lt;sys/socket.h...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''close, sockclose (HLCALL 0x3E03)''' - close a socket&lt;br /&gt;
&lt;br /&gt;
== Synopsis ==&lt;br /&gt;
&lt;br /&gt;
''Assembly language''&lt;br /&gt;
&lt;br /&gt;
     ld a, (v_sockfd)&lt;br /&gt;
     ld hl, CLOSE&lt;br /&gt;
     call HLCALL&lt;br /&gt;
&lt;br /&gt;
''C''&lt;br /&gt;
&lt;br /&gt;
     #include &amp;lt;sys/socket.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
     int sockclose(int sockfd);&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
The close/sockclose function closes a socket. In the C library, the function call is defined as sockclose, since the Z88DK fcntl is not yet generalized enough to use the base close() routine to close sockets. The socket to close is passed in the parameter ''sockfd''.&lt;br /&gt;
&lt;br /&gt;
For the assembler routine, the socket to close is passed in the A register.&lt;br /&gt;
&lt;br /&gt;
== Return values ==&lt;br /&gt;
&lt;br /&gt;
The C routine returns -1 if an error occurs.&lt;br /&gt;
&lt;br /&gt;
The assembly language routine sets the carry flag, and returns the error code in A if the call fails.&lt;br /&gt;
&lt;br /&gt;
[[Category:Spectranet]]&lt;/div&gt;</summary>
		<author><name>Winston</name></author>
	</entry>
</feed>