{
    "content": [
        {
            "type": "text",
            "text": "# IO::Poll (perldoc)\n\n**Summary:** IO::Poll - Object interface to system poll call\n\n**Synopsis:** use IO::Poll qw(POLLRDNORM POLLWRNORM POLLIN POLLHUP);\n$poll = IO::Poll->new();\n$poll->mask($inputhandle => POLLIN);\n$poll->mask($outputhandle => POLLOUT);\n$poll->poll($timeout);\n$ev = $poll->events($input);\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (11 lines)\n- **DESCRIPTION** (2 lines)\n- **METHODS** (19 lines) — 1 subsections\n  - handles (4 lines)\n- **SEE ALSO** (1 lines) — 1 subsections\n  - poll (1 lines)\n- **AUTHOR** (3 lines)\n- **COPYRIGHT** (3 lines)\n\n## Full Content\n\n### NAME\n\nIO::Poll - Object interface to system poll call\n\n### SYNOPSIS\n\nuse IO::Poll qw(POLLRDNORM POLLWRNORM POLLIN POLLHUP);\n\n$poll = IO::Poll->new();\n\n$poll->mask($inputhandle => POLLIN);\n$poll->mask($outputhandle => POLLOUT);\n\n$poll->poll($timeout);\n\n$ev = $poll->events($input);\n\n### DESCRIPTION\n\n\"IO::Poll\" is a simple interface to the system level poll routine.\n\n### METHODS\n\nmask ( IO [, EVENTMASK ] )\nIf EVENTMASK is given, then, if EVENTMASK is non-zero, IO is added to the list of file\ndescriptors and the next call to poll will check for any event specified in EVENTMASK. If\nEVENTMASK is zero then IO will be removed from the list of file descriptors.\n\nIf EVENTMASK is not given then the return value will be the current event mask value for\nIO.\n\npoll ( [ TIMEOUT ] )\nCall the system level poll routine. If TIMEOUT is not specified then the call will block.\nReturns the number of handles which had events happen, or -1 on error.\n\nevents ( IO )\nReturns the event mask which represents the events that happened on IO during the last call\nto \"poll\".\n\nremove ( IO )\nRemove IO from the list of file descriptors for the next poll.\n\n#### handles\n\nReturns a list of handles. If EVENTMASK is not given then a list of all handles known will\nbe returned. If EVENTMASK is given then a list of handles will be returned which had one of\nthe events specified by EVENTMASK happen during the last call ti \"poll\"\n\n### SEE ALSO\n\n#### poll\n\n### AUTHOR\n\nGraham Barr. Currently maintained by the Perl Porters. Please report all bugs to\n<perlbug@perl.org>.\n\n### COPYRIGHT\n\nCopyright (c) 1997-8 Graham Barr <gbarr@pobox.com>. All rights reserved. This program is free\nsoftware; you can redistribute it and/or modify it under the same terms as Perl itself.\n\n"
        }
    ],
    "structuredContent": {
        "command": "IO::Poll",
        "section": "",
        "mode": "perldoc",
        "summary": "IO::Poll - Object interface to system poll call",
        "synopsis": "use IO::Poll qw(POLLRDNORM POLLWRNORM POLLIN POLLHUP);\n$poll = IO::Poll->new();\n$poll->mask($inputhandle => POLLIN);\n$poll->mask($outputhandle => POLLOUT);\n$poll->poll($timeout);\n$ev = $poll->events($input);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 19,
                "subsections": [
                    {
                        "name": "handles",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 1,
                "subsections": [
                    {
                        "name": "poll",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "IO::Poll - Object interface to system poll call\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use IO::Poll qw(POLLRDNORM POLLWRNORM POLLIN POLLHUP);\n\n$poll = IO::Poll->new();\n\n$poll->mask($inputhandle => POLLIN);\n$poll->mask($outputhandle => POLLOUT);\n\n$poll->poll($timeout);\n\n$ev = $poll->events($input);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"IO::Poll\" is a simple interface to the system level poll routine.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "mask ( IO [, EVENTMASK ] )\nIf EVENTMASK is given, then, if EVENTMASK is non-zero, IO is added to the list of file\ndescriptors and the next call to poll will check for any event specified in EVENTMASK. If\nEVENTMASK is zero then IO will be removed from the list of file descriptors.\n\nIf EVENTMASK is not given then the return value will be the current event mask value for\nIO.\n\npoll ( [ TIMEOUT ] )\nCall the system level poll routine. If TIMEOUT is not specified then the call will block.\nReturns the number of handles which had events happen, or -1 on error.\n\nevents ( IO )\nReturns the event mask which represents the events that happened on IO during the last call\nto \"poll\".\n\nremove ( IO )\nRemove IO from the list of file descriptors for the next poll.\n",
                "subsections": [
                    {
                        "name": "handles",
                        "content": "Returns a list of handles. If EVENTMASK is not given then a list of all handles known will\nbe returned. If EVENTMASK is given then a list of handles will be returned which had one of\nthe events specified by EVENTMASK happen during the last call ti \"poll\"\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "",
                "subsections": [
                    {
                        "name": "poll",
                        "content": ""
                    }
                ]
            },
            "AUTHOR": {
                "content": "Graham Barr. Currently maintained by the Perl Porters. Please report all bugs to\n<perlbug@perl.org>.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c) 1997-8 Graham Barr <gbarr@pobox.com>. All rights reserved. This program is free\nsoftware; you can redistribute it and/or modify it under the same terms as Perl itself.\n",
                "subsections": []
            }
        }
    }
}