MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Send",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "39": {
                "pageid": 39,
                "ns": 0,
                "title": "Recv",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "'''recv (HLCALL 0x3E15)''' - receive data from a connected socket\n\n== Synopsis ==\n\n''Assembly language''\n\n ld a, (sock_fd)\n ld de, BUFFER_ADDR\n ld bc, BUFFER_SIZE\n ld hl, RECV\n call HLCALL\n\n''C''\n\n #include <sys/types.h>\n #include <sys/socket.h>\n \n ssize_t recv(int sockfd, void *buf, size_t len, int flags);\n\n== Description ==\n\nThe recv call is used only on a connected socket - a SOCK_STREAM socket that has been accepted with [[accept]]() or connected to with [[connect]](). The recv() call receives up to ''len'' bytes of data from the socket specified by ''sockfd'', copying it to the buffer specified by the memory address ''buf''. In the current implementation, the ''flags'' parameter is not used and should be set to 0.\n\nThe assembly language function copies data from the socket file descriptor specified in the A register to the memory address pointed to by the DE register pair, up to the number of bytes specified in the BC register pair.\n\nThe recv call blocks until data is ready on the socket. If blocking must be avoided, the socket can be checked for ready data using one of the poll routines before recv is called.\n\n== Return values ==\n\nOn success, the C routine returns the number of bytes received from the socket. On error, it returns -1.\n\nOn success, the assembly language routine returns the number of bytes received in the BC register pair. On error, the carry flag is set and A contains the error number.\n\n[[Category:Spectranet]]"
                    }
                ]
            },
            "45": {
                "pageid": 45,
                "ns": 0,
                "title": "Recvfrom",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "'''recvfrom (IXCALL 0x3E1B)''' - receive a message from a socket\n\n== Synopsis ==\n\n''Assembly language''\n\n    ld a, (v_sockfd)\n    ld hl, BUF_CONNINFO\n    ld de, BUF_DATA\n    ld bc, BUF_DATA_LEN\n    ld ix, RECVFROM\n    call IXCALL\n\n''C''\n\n    #include <sys/types.h>\n    #include <sys/socket.h>\n \n    int recvfrom(int sockfd, void *buf, size_t len, int flags, struct sockaddr_in *from, socklen_t *fromlen);\n\n== Description ==\n\nThe '''recvfrom()''' call is used to receive messages from a socket, and may be used to receive data on a socket whether or not it is connection-oriented. The recvfrom() call is typically used with UDP (SOCK_DGRAM) sockets to receive a datagram from the remote host.\n\nThe socket is specified by the ''sockfd'' parameter. The ''buf'' parameter is a pointer to a buffer which should be filled with the data from the remote host, and the ''len'' parameter specifies the maximum number of bytes that may be copied into this buffer. In the current implementation, the ''flags'' parameter is not used. The ''from'' parameter is a pointer to a struct sockaddr_in, and this structure will be filled with information about the remote host that sent the datagram that is being received. The ''fromlen'' parameter specifies the size of the structure; it is currently unused since the only structure type that is valid for this call is a struct sockaddr_in, and is provided to give compatibility with the BSD socket library specification.\n\nFor the assembly language interface, the socket is specified in the A register, the register pair DE contains the address in memory where the received data should be written, and the BC register pair contains the maximum number of bytes that may be copied into this area of memory. The HL register pair points to a location in memory where the information about the remote host may be copied. The connection information is 8 bytes long, so the memory location contained in HL must be a location with at least 8 bytes free. The assembly language interface fills the memory pointed to by HL in the following format:\n\n bytes 0,1,2,3 - the remote host's IP address\n bytes 4,5     - the remote host's port number\n bytes 6,7     - the local host's port number\n\n== Return values ==\n\nOn return, the C interface returns the number of bytes actually received, or -1 if an error occurred.\n\nThe assembly language interface returns the number of bytes received in BC on success. On error, the carry flag is set and the A register contains the error code.\n\n[[Category:Spectranet]]"
                    }
                ]
            }
        }
    }
}