Reference :: Boost.Redis

# Reference

## boost::redis::basic_connection::receive

Receives server pushes synchronously without blocking.

### Synopsis

Declared in `<boost/redis/connection.hpp>`

    std::size_t
    receive(system::error_code& ec);

### Description

Receives a server push synchronously by calling `try_receive` on the underlying channel. If the operation fails because `try_receive` returns `false`, `ec` will be set to `boost::redis::error::sync_receive_push_failed`.

### Return Value

The number of bytes read from the socket.

### Parameters

Name | Description
ec | Contains the error if any occurred.

Created with MrDocs