TT_DEFAULT_SESSION_SET(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’– tt_default_session_set β€” set the current default session identifier πŸ’–

okay so welcome to the library call manual page for tt_default_session_set, bestie ✨ this is the one that sets the current default session identifier, and we're gonna get into it πŸ’…

🌸 NAME 🌸

tt_default_session_set β€” set the current default session identifier.

like, that's the whole name vibe: it sets the current default session identifier, periodt πŸŽ€

✨ SYNOPSIS ✨

#include &<Tt/tt_c.h>
Tt_status tt_default_session_set(
const char *sessid);

πŸ’… DESCRIPTION πŸ’…

tt_default_session_set sets the current default session identifier. the ToolTalk service uses the initial user session as the default session, and it supports one session per procid. your application can make this call before it calls tt_open(3) to specify the session it wants to connect to πŸ¦‹

the sessid argument is a pointer to the unique identifier for the session in which the procid is interested β€” that's the little handle you're passing in, iykyk πŸ’–

πŸ¦‹ RETURN VALUE πŸ¦‹

upon successful completion, tt_default_session_set returns the status of the operation as one of these Tt_status values, no cap:

  • TT_OK β€” the operation completed successfully. slay βœ…
  • TT_ERR_NOMP β€” the ttsession(1) process is not running and the ToolTalk service cannot restart it. πŸ’€
  • TT_ERR_PROCID β€” the current default process identifier is out of date or invalid. 🫠
  • TT_ERR_SESSION β€” the specified ToolTalk session is out of date or invalid. πŸ™ˆ

πŸŽ€ APPLICATION USAGE πŸŽ€

to change to another opened session, the application must use the tt_default_procid_set function. that's the move, okay? πŸ’…

to join other sessions, the procid must first set the new session as the default session, and then initialize and register with the ToolTalk service. the calls required must be in this exact order, bestie:

tt_default_session_set
tt_open

tt_open(3) may create another ToolTalk procid, and the connection to it is identified by a procid. only one ToolTalk session per procid is allowed. (however, multiple procids are allowed in a client.) there are no API calls to determine to which session a particular procid is connected. if it is important for the application to know the session to which it is connected, it must make these calls in the indicated order:

tt_open
tt_default_session

then the application can store that information by indexing it by the procid returned by the tt_open(3) call. cute little bookkeeping moment πŸ“šβœ¨

🌈 SEE ALSO 🌈

okay that's the whole tt_default_session_set library call moment, bestie β€” the footer gave us no extra version/date lore, so I'm not inventing any πŸ’€πŸŒΈ bye, love you, mwah πŸ’–

πŸ“¦ where this page comes from