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

Implements OP_SOCK_CLOSE to close a socket file descriptor. More...

Go to the source code of this file.

Functions

 free_value (fdv)
 push_value (vm, make_int(ok))

Variables

case OP_SOCK_CLOSE
int ok = 0
 break

Detailed Description

Implements OP_SOCK_CLOSE to close a socket file descriptor.

Behavior:

  • Pops fd (int) and closes it; pushes 1 on success, 0 on failure.
  • On non-UNIX platforms, always pushes 0 (unsupported).

Errors:

  • If argument type is wrong, prints an error and pushes 0.

Definition in file socket_close.c.

Function Documentation

◆ free_value()

free_value(fdv)

◆ push_value()

push_value(vm,
make_int(ok) )

Variable Documentation

◆ break

break

Definition at line 38 of file socket_close.c.

◆ ok

int ok = 0

Definition at line 25 of file socket_close.c.

◆ OP_SOCK_CLOSE

case OP_SOCK_CLOSE

Definition at line 22 of file socket_close.c.