module_socket.c File Reference
Lightweight, low-level wrapper around the standard Berkley sockets API. More...
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
#include <kuroko/vm.h>
#include <kuroko/util.h>
Include dependency graph for module_socket.c:
Go to the source code of this file.
Data Structures | |
struct | socket |
Macros | |
#define | IS_socket(o) (krk_isInstanceOf(o,SocketClass)) |
#define | AS_socket(o) ((struct socket*)AS_OBJECT(o)) |
#define | CURRENT_CTYPE struct socket * |
#define | CURRENT_NAME self |
#define | SOCK_CONST(o) krk_attachNamedValue(&module->fields, #o, INTEGER_VAL(o)); |
Functions | |
KrkValue | _socket___init__ (int, KrkValue *, int) |
KrkValue | _socket___repr__ (int, KrkValue *, int) |
KrkValue | _socket_connect (int, KrkValue *, int) |
KrkValue | _socket_bind (int, KrkValue *, int) |
KrkValue | _socket_listen (int, KrkValue *, int) |
KrkValue | _socket_accept (int, KrkValue *, int) |
KrkValue | _socket_shutdown (int, KrkValue *, int) |
KrkValue | _socket_recv (int, KrkValue *, int) |
KrkValue | _socket_send (int, KrkValue *, int) |
KrkValue | _socket_sendto (int, KrkValue *, int) |
KrkValue | _socket_fileno (int, KrkValue *, int) |
KrkValue | _socket_setsockopt (int, KrkValue *, int) |
KrkValue | _krk_htons (int, KrkValue *, int) |
KrkValue | _socket_family (int, KrkValue *, int) |
KrkValue | _socket_type (int, KrkValue *, int) |
KrkValue | _socket_proto (int, KrkValue *, int) |
KRK_Module (socket) | |
Detailed Description
Lightweight, low-level wrapper around the standard Berkley sockets API.
Definition in file module_socket.c.
Function Documentation
◆ KRK_Module()
KRK_Module | ( | socket | ) |
AF_ constants Taken from the manpages for Linux, and all shoved behind ifdefs, so this should build fine on most anything even if most of these aren't widely supported by other platforms.
Definition at line 516 of file module_socket.c.