REMCTL_NEW(3)

πŸ“¦
version 3.18 Β· 3 versions
, in debian bookworm, debian trixie, epel 9, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ REMCTL_NEW(3) ✨

okay bestie, welcome to the remctl Library Reference πŸ’– this is the little page about remctl_new(3), and it's literally the first thing you call. sit down, grab a strawberry πŸ“, let's go.


🌸 NAME 🌸

remctl_new β€” create a new remctl client ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <remctl.h>

struct remctl *remctl_new(void);

πŸ¦‹ DESCRIPTION πŸ¦‹

so remctl_new() creates a new remctl client. that's it, that's the whole vibe. πŸ‘‘

the resulting remctl struct is opaque from the caller's perspective β€” meaning like, you don't get to peek inside it, it's giving mysterious main character energy πŸ’… β€” but it should be the first argument to all subsequent calls into the remctl API. every single one. no cap.

normally, the very next call after remctl_new() would be remctl_open() to connect to a remote server. that's the natural order of things, the plot arc, the character development. 🌈

and then β€” this part matters β€” the resulting struct should be freed by calling remctl_close(). don't just leave it lying around, bestie, that's not cute. 🫢


πŸ’œ RETURN VALUE πŸ’œ

remctl_new() returns a pointer to an opaque remctl struct on success ✨ and NULL on failure 😭.

if it returns NULL, errno will be set to an appropriate error code (normally ENOMEM). so like, check your errno, she's trying to tell you something.


🌟 COMPATIBILITY 🌟

this interface has been provided by the remctl client library since its initial release in version 2.0. so she's been here since day one, an absolute icon, we stan a consistent API. πŸ‘‘


🧚 AUTHOR 🧚

Russ Allbery <eagle@eyrie.org>


Copyright 2007, 2009, 2014 The Board of Trustees of the Leland Stanford Junior University

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

SPDX-License-Identifier: FSFAP


πŸ”₯ SEE ALSO πŸ”₯

The current version of the remctl library and complete details of the remctl protocol are available from its web page at <https://www.eyrie.org/~eagle/software/remctl/>.


and that's the whole page, bestie!! this was version 3.18, dated 2022-05-09, and it came to you straight from the remctl Library Reference. go forth and remctl_new() responsibly πŸ’–βœ¨πŸ¦‹