%write_ssl() function

The %write_ssl() function writes the number of bytes designated by size from var to the Secure connection specified by ssl_fd descriptor. This descriptor is returned by a previous call to %accept_ssl() or %connect_ssl.

Note: To use this function, the OpenSSL libraries must be installed.

The %write_ssl() function writes the number of bytes designated by size from var to the Secure connection specified by ssl_fd descriptor. This descriptor is returned by a previous call to %accept_ssl() or %connect_ssl.

Syntax

n = %write_ssl(ssl.fd, var, size)

Parameter(s)

ssl_fd File descriptor of the secure connection.

Description

This function returns the number of bytes actually written. If the length of var is less than size, the content of the string written is undefined, as is usual in C. No data translation occurs.

Example(s)

n=len(item)
if %write_ssl(ssl_fd,item,n)<n then crt "write error"