# %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"
```

## See also

- [%write() function](https://d3codex.com/pickbasic-flashbasic/percent-write-function/)
- [%accept_ssl() function](https://d3codex.com/pickbasic-flashbasic/percent-accept-ssl-function/)
- [%close_ssl() function](https://d3codex.com/pickbasic-flashbasic/percent-close-ssl-function/)
- [%connect_ssl() function](https://d3codex.com/pickbasic-flashbasic/percent-connect-ssl-function/)
- [%read_ssl() function](https://d3codex.com/pickbasic-flashbasic/percent-read-ssl-function/)

---
Source: https://d3codex.com/pickbasic-flashbasic/percent-write-ssl-function/ - part of the D3Codex reference.
