Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
socket_unix_connect.c File Reference

Implements OP_SOCK_UNIX_CONNECT to connect to a UNIX domain socket path. More...

#include <string.h>
Include dependency graph for socket_unix_connect.c:

Go to the source code of this file.

Functions

 free_value (pathv)
 push_value (vm, make_int(fd > 0 ? fd :0))

Variables

case OP_SOCK_UNIX_CONNECT
int fd = 0
 break

Detailed Description

Implements OP_SOCK_UNIX_CONNECT to connect to a UNIX domain socket path.

Behavior:

  • Pops path (string); creates an AF_UNIX SOCK_STREAM and connects to it; pushes fd (>0) or 0.

Errors:

  • On wrong type or OS errors, prints an error and pushes 0. Non-UNIX platforms return 0.

Definition in file socket_unix_connect.c.

Function Documentation

◆ free_value()

free_value(pathv)

◆ push_value()

push_value(vm,
make_int(fd > 0 ? fd :0) )

Variable Documentation

◆ break

break

Definition at line 61 of file socket_unix_connect.c.

◆ fd

int fd = 0

Definition at line 32 of file socket_unix_connect.c.

◆ OP_SOCK_UNIX_CONNECT

case OP_SOCK_UNIX_CONNECT

Definition at line 29 of file socket_unix_connect.c.