@@ -218,7 +218,7 @@ recv_aio.nanoSocket <- function(con,
218218 aio <- .Call(rnng_recv_aio , con , timeout )
219219 is.integer(aio ) && {
220220 logerror(aio )
221- return (invisible (`class<-`( aio , " errorValue " ) ))
221+ return (invisible (aio ))
222222 }
223223 env <- `class<-`(new.env(), " recvAio" )
224224 data <- raw <- NULL
@@ -229,7 +229,7 @@ recv_aio.nanoSocket <- function(con,
229229 res <- .Call(rnng_aio_get_msg , aio )
230230 missing(res ) && return (.Call(rnng_aio_unresolv ))
231231 is.integer(res ) && {
232- data <<- raw <<- `class<-`( res , " errorValue " )
232+ data <<- raw <<- res
233233 unresolv <<- FALSE
234234 logerror(res )
235235 return (invisible (data ))
@@ -253,7 +253,7 @@ recv_aio.nanoSocket <- function(con,
253253 res <- .Call(rnng_aio_get_msg , aio )
254254 missing(res ) && return (.Call(rnng_aio_unresolv ))
255255 is.integer(res ) && {
256- data <<- raw <<- `class<-`( res , " errorValue " )
256+ data <<- raw <<- res
257257 unresolv <<- FALSE
258258 logerror(res )
259259 return (invisible (data ))
@@ -292,7 +292,7 @@ recv_aio.nanoContext <- function(con,
292292 aio <- .Call(rnng_ctx_recv_aio , con , timeout )
293293 is.integer(aio ) && {
294294 logerror(aio )
295- return (invisible (`class<-`( aio , " errorValue " ) ))
295+ return (invisible (aio ))
296296 }
297297 env <- `class<-`(new.env(), " recvAio" )
298298 data <- raw <- NULL
@@ -303,7 +303,7 @@ recv_aio.nanoContext <- function(con,
303303 res <- .Call(rnng_aio_get_msg , aio )
304304 missing(res ) && return (.Call(rnng_aio_unresolv ))
305305 is.integer(res ) && {
306- data <<- raw <<- `class<-`( res , " errorValue " )
306+ data <<- raw <<- res
307307 unresolv <<- FALSE
308308 logerror(res )
309309 return (invisible (data ))
@@ -327,7 +327,7 @@ recv_aio.nanoContext <- function(con,
327327 res <- .Call(rnng_aio_get_msg , aio )
328328 missing(res ) && return (.Call(rnng_aio_unresolv ))
329329 is.integer(res ) && {
330- data <<- raw <<- `class<-`( res , " errorValue " )
330+ data <<- raw <<- res
331331 unresolv <<- FALSE
332332 logerror(res )
333333 return (invisible (data ))
@@ -367,7 +367,7 @@ recv_aio.nanoStream <- function(con,
367367 aio <- .Call(rnng_stream_recv_aio , con , n , timeout )
368368 is.integer(aio ) && {
369369 logerror(aio )
370- return (invisible (`class<-`( aio , " errorValue " ) ))
370+ return (invisible (aio ))
371371 }
372372 env <- `class<-`(new.env(), " recvAio" )
373373 data <- raw <- NULL
@@ -378,7 +378,7 @@ recv_aio.nanoStream <- function(con,
378378 res <- .Call(rnng_aio_stream_in , aio )
379379 missing(res ) && return (.Call(rnng_aio_unresolv ))
380380 is.integer(res ) && {
381- data <<- raw <<- `class<-`( res , " errorValue " )
381+ data <<- raw <<- res
382382 unresolv <<- FALSE
383383 logerror(res )
384384 return (invisible (data ))
@@ -402,7 +402,7 @@ recv_aio.nanoStream <- function(con,
402402 res <- .Call(rnng_aio_stream_in , aio )
403403 missing(res ) && return (.Call(rnng_aio_unresolv ))
404404 is.integer(res ) && {
405- data <<- raw <<- `class<-`( res , " errorValue " )
405+ data <<- raw <<- res
406406 unresolv <<- FALSE
407407 logerror(res )
408408 return (invisible (data ))
@@ -483,13 +483,7 @@ recv_aio.nanoStream <- function(con,
483483# '
484484call_aio <- function (aio ) {
485485
486- .Call(rnng_aio_call , .subset2(aio , " aio" )) && return (invisible (aio ))
487- if (inherits(aio , " recvAio" )) {
488- .subset2(aio , " data" )
489- } else if (inherits(aio , " sendAio" )) {
490- .subset2(aio , " result" )
491- }
492- invisible (aio )
486+ invisible (.Call(rnng_aio_call , aio ))
493487
494488}
495489
@@ -510,7 +504,7 @@ call_aio <- function(aio) {
510504# '
511505stop_aio <- function (aio ) {
512506
513- invisible (.Call(rnng_aio_stop , .subset2( aio , " aio " ) ))
507+ invisible (.Call(rnng_aio_stop , aio ))
514508
515509}
516510
0 commit comments