is_aio: Validators

View source: R/utils.R

is_aioR Documentation

Validators

Description

Validator functions for object types created by nanonext.

Usage

is_aio(x)

is_nano(x)

is_ncurl_session(x)

Arguments

x

an object.

Details

Is the object an Aio (inheriting from class 'sendAio' or 'recvAio').

Is the object an object inheriting from class 'nano' i.e. a nanoSocket, nanoContext, nanoStream, nanoListener, nanoDialer, nanoMonitor or nano Object.

Is the object an ncurlSession (object of class 'ncurlSession').

Is the object a Condition Variable (object of class 'conditionVariable').

Value

Logical value TRUE or FALSE.

Examples

nc <- call_aio(ncurl_aio("https://postman-echo.com/get", timeout = 1000L))
is_aio(nc)

s <- socket()
is_nano(s)
n <- nano()
is_nano(n)
close(s)
n$close()

s <- ncurl_session("https://postman-echo.com/get", timeout = 1000L)
is_ncurl_session(s)
if (is_ncurl_session(s)) close(s)


nanonext documentation built on April 4, 2025, 5:18 a.m.