{
    "mode": "man",
    "parameter": "bio",
    "section": "7ssl",
    "url": "https://www.chedong.com/phpMan.php/man/bio/7ssl/json",
    "generated": "2026-07-05T13:02:18Z",
    "synopsis": "#include <openssl/bio.h>",
    "sections": {
        "NAME": {
            "content": "bio - Basic I/O abstraction\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "#include <openssl/bio.h>\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A BIO is an I/O abstraction, it hides many of the underlying I/O details from an application.\nIf an application uses a BIO for its I/O it can transparently handle SSL connections,\nunencrypted network connections and file I/O.\n\nThere are two types of BIO, a source/sink BIO and a filter BIO.\n\nAs its name implies a source/sink BIO is a source and/or sink of data, examples include a\nsocket BIO and a file BIO.\n\nA filter BIO takes data from one BIO and passes it through to another, or the application.\nThe data may be left unmodified (for example a message digest BIO) or translated (for example\nan encryption BIO). The effect of a filter BIO may change according to the I/O operation it\nis performing: for example an encryption BIO will encrypt data if it is being written to and\ndecrypt data if it is being read from.\n\nBIOs can be joined together to form a chain (a single BIO is a chain with one component). A\nchain normally consists of one source/sink BIO and one or more filter BIOs. Data read from or\nwritten to the first BIO then traverses the chain to the end (normally a source/sink BIO).\n\nSome BIOs (such as memory BIOs) can be used immediately after calling BIOnew(). Others (such\nas file BIOs) need some additional initialization, and frequently a utility function exists\nto create and initialize such BIOs.\n\nIf BIOfree() is called on a BIO chain it will only free one BIO resulting in a memory leak.\n\nCalling BIOfreeall() on a single BIO has the same effect as calling BIOfree() on it other\nthan the discarded return value.\n\nNormally the type argument is supplied by a function which returns a pointer to a BIOMETHOD.\nThere is a naming convention for such functions: a source/sink BIO typically starts with\nBIOs and a filter BIO with BIOf.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "Create a memory BIO:\n\nBIO *mem = BIOnew(BIOsmem());\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "BIOctrl(3), BIOfbase64(3), BIOfbuffer(3), BIOfcipher(3), BIOfmd(3), BIOfnull(3),\nBIOfssl(3), BIOfreadbuffer(3), BIOfindtype(3), BIOnew(3), BIOnewbiopair(3),\nBIOpush(3), BIOreadex(3), BIOsaccept(3), BIOsbio(3), BIOsconnect(3), BIOsfd(3),\nBIOsfile(3), BIOsmem(3), BIOsnull(3), BIOssocket(3), BIOsetcallback(3),\nBIOshouldretry(3)\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.\n\nLicensed under the Apache License 2.0 (the \"License\").  You may not use this file except in\ncompliance with the License.  You can obtain a copy in the file LICENSE in the source\ndistribution or at <https://www.openssl.org/source/license.html>.\n\n\n\n3.0.2                                        2026-06-02                                    BIO(7SSL)",
            "subsections": []
        }
    },
    "summary": "bio - Basic I/O abstraction",
    "flags": [],
    "examples": [
        "Create a memory BIO:",
        "BIO *mem = BIOnew(BIOsmem());"
    ],
    "see_also": [
        {
            "name": "BIOctrl",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOctrl/3/json"
        },
        {
            "name": "BIOfbase64",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOfbase64/3/json"
        },
        {
            "name": "BIOfbuffer",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOfbuffer/3/json"
        },
        {
            "name": "BIOfcipher",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOfcipher/3/json"
        },
        {
            "name": "BIOfmd",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOfmd/3/json"
        },
        {
            "name": "BIOfnull",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOfnull/3/json"
        },
        {
            "name": "BIOfssl",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOfssl/3/json"
        },
        {
            "name": "BIOfreadbuffer",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOfreadbuffer/3/json"
        },
        {
            "name": "BIOfindtype",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOfindtype/3/json"
        },
        {
            "name": "BIOnew",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOnew/3/json"
        },
        {
            "name": "BIOnewbiopair",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOnewbiopair/3/json"
        },
        {
            "name": "BIOpush",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOpush/3/json"
        },
        {
            "name": "BIOreadex",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOreadex/3/json"
        },
        {
            "name": "BIOsaccept",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOsaccept/3/json"
        },
        {
            "name": "BIOsbio",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOsbio/3/json"
        },
        {
            "name": "BIOsconnect",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOsconnect/3/json"
        },
        {
            "name": "BIOsfd",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOsfd/3/json"
        },
        {
            "name": "BIOsfile",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOsfile/3/json"
        },
        {
            "name": "BIOsmem",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOsmem/3/json"
        },
        {
            "name": "BIOsnull",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOsnull/3/json"
        },
        {
            "name": "BIOssocket",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOssocket/3/json"
        },
        {
            "name": "BIOsetcallback",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOsetcallback/3/json"
        },
        {
            "name": "BIOshouldretry",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/BIOshouldretry/3/json"
        }
    ]
}