Closes the connection with the host.

1 socket.in.read

<socket.in.read>
    <socket /> +
</socket.in.read>
Example

Read bytes from a socket and shows them on the screen.

Copy
<xsql-script name='socket'>
    <body>
        <set name='s'>
            <socket host='dbsrv1' port='7301' />
        </set>

        <socket.out.print>
            <s />
            <string>HELLO<string.cr /><string.nl /></string>
        </socket.out.print>

        <while>
            <expr>
                <ne>
                    <set name='c'>
                        <socket.in.read>
                            <s />
                        </socket.in.read>
                    </set>
                    -1
                </ne>
            </expr>
            <do>
                <println><c/></println>
            </do>
        </while>
    </body>
</xsql-script>