<?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=Send</id>
	<title>Send - 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=Send"/>
	<link rel="alternate" type="text/html" href="https://spectrum.alioth.net/doc/index.php?title=Send&amp;action=history"/>
	<updated>2026-05-03T18:17:05Z</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=Send&amp;diff=144&amp;oldid=prev</id>
		<title>Winston: New page: '''send (HLCALL 0x3E12)''' - send data via a connected socket  == Synopsis ==  ''Assembly language''     ld a, (v_sockfd)    ld de, BUFFER_ADDR    ld bc, BUFFER_SIZE    ld hl, SEND    call...</title>
		<link rel="alternate" type="text/html" href="https://spectrum.alioth.net/doc/index.php?title=Send&amp;diff=144&amp;oldid=prev"/>
		<updated>2008-08-16T10:27:03Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;#039;&amp;#039;&amp;#039;send (HLCALL 0x3E12)&amp;#039;&amp;#039;&amp;#039; - send data via a connected socket  == Synopsis ==  &amp;#039;&amp;#039;Assembly language&amp;#039;&amp;#039;     ld a, (v_sockfd)    ld de, BUFFER_ADDR    ld bc, BUFFER_SIZE    ld hl, SEND    call...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''send (HLCALL 0x3E12)''' - send data via a connected 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 de, BUFFER_ADDR&lt;br /&gt;
   ld bc, BUFFER_SIZE&lt;br /&gt;
   ld hl, SEND&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;
   #include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
   int send(int sockfd, void *buf, size_t len, int flags);&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
The '''send()''' call is used to send data via a connected socket, that has been connected with either the [[connect]] or [[accept]] calls. The send() call sends the number of bytes specified by the ''len'' parameter, from the memory pointed to by ''buf'' to the socket specified by ''sockfd''. The flags parameter is currently not used. &lt;br /&gt;
&lt;br /&gt;
The assembly language interface sends the contents of memory pointed to by the DE register pair, with the number of bytes to send specified in the BC register pair. The accumulator contains the socket number.&lt;br /&gt;
&lt;br /&gt;
== Return values ==&lt;br /&gt;
&lt;br /&gt;
On successful return, the C function returns the number of bytes sent. On error, the C function returns -1.&lt;br /&gt;
&lt;br /&gt;
The assembler interface returns the number of bytes sent in the BC register pair. On error, the carry flag is set and the A register contains the error code.&lt;br /&gt;
&lt;br /&gt;
[[Category:Spectranet]]&lt;/div&gt;</summary>
		<author><name>Winston</name></author>
	</entry>
</feed>