diff --git a/asyncutils.nim b/asyncutils.nim index e010d71..a70d8cf 100644 --- a/asyncutils.nim +++ b/asyncutils.nim @@ -46,8 +46,7 @@ proc asyncExecCmd*(command: string): Future[int] = addEvent(event, callback) return future -proc asyncSendMsg*(fd: AsyncFD, - data: string, +proc asyncSendMsg*(fd: AsyncFD, data: string, ancillaryData: Option[AsyncFD] = none(AsyncFD)): Future[void] = var retFuture = newFuture[void]("asyncSendMsg") @@ -93,10 +92,11 @@ proc asyncSendMsg*(fd: AsyncFD, return retFuture proc asyncRecvMsg*(fd: AsyncFD, - size: int): Future[tuple[data: string, ancillaryFd: Option[AsyncFD]]] = - var retFuture = newFuture[ - tuple[data: string, ancillaryFd: Option[AsyncFD]] - ]("asyncRecvMsg") + size: int): Future[tuple[data: string, + ancillaryData: Option[AsyncFD]]] = + var retFuture = + newFuture[tuple[data: string, + ancillaryData: Option[AsyncFD]]]("asyncRecvMsg") proc cb(sock: AsyncFD): bool = result = true