<commit_before>// bdls_pipeutil.h                                                    -*-C++-*-

// ----------------------------------------------------------------------------
//                                   NOTICE
//
// This component is not up to date with current BDE coding standards, and
// should not be used as an example for new development.
// ----------------------------------------------------------------------------

#ifndef INCLUDED_BDLS_PIPEUTIL
#define INCLUDED_BDLS_PIPEUTIL

#ifndef INCLUDED_BSLS_IDENT
#include <bsls_ident.h>
#endif
BSLS_IDENT("$Id: $")

//@PURPOSE: Provide basic portable named-pipe utilities.
//
//@CLASSES:
//  bdls::PipeUtil: Portable utility methods for naming and accessing pipes
//
//@AUTHOR: <NAME> (dschumann1)
//
//@SEE_ALSO:
//
//@DESCRIPTION: This component, 'bdls::PipeUtil', provides portable utility
// methods for named pipes.

#ifndef INCLUDED_BDLSCM_VERSION
#include <bdlscm_version.h>
#endif

#ifndef INCLUDED_BSL_STRING
#include <bsl_string.h>
#endif


namespace BloombergLP {

namespace bdls {
                              // ===============
                              // struct PipeUtil
                              // ===============
struct PipeUtil {
    // This struct contains utility methods for platform-independent named pipe
    // operations.

    static int makeCanonicalName(bsl::string              *pipeName,
                                 const bslstl::StringRef&  baseName);
        // Load into the specified 'pipeName' the system-dependent canonical
        // pipe name corresponding to the specified 'baseName'.  Return 0 on
        // success, and a nonzero value if 'baseName' cannot be part of a pipe
        // name on this system.

    static int send(const bslstl::StringRef& pipeName,
                    const bslstl::StringRef& message);<commit_msg>Add doc about SOCKDIR and TMPDIR.<commit_after>// bdls_pipeutil.h                                                    -*-C++-*-

// ----------------------------------------------------------------------------
//                                   NOTICE
//
// This component is not up to date with current BDE coding standards, and
// should not be used as an example for new development.
// ----------------------------------------------------------------------------

#ifndef INCLUDED_BDLS_PIPEUTIL
#define INCLUDED_BDLS_PIPEUTIL

#ifndef INCLUDED_BSLS_IDENT
#include <bsls_ident.h>
#endif
BSLS_IDENT("$Id: $")

//@PURPOSE: Provide basic portable named-pipe utilities.
//
//@CLASSES:
//  bdls::PipeUtil: Portable utility methods for naming and accessing pipes
//
//@AUTHOR: <NAME> (dschumann1)
//
//@SEE_ALSO:
//
//@DESCRIPTION: This component, 'bdls::PipeUtil', provides portable utility
// methods for named pipes.

#ifndef INCLUDED_BDLSCM_VERSION
#include <bdlscm_version.h>
#endif

#ifndef INCLUDED_BSL_STRING
#include <bsl_string.h>
#endif


namespace BloombergLP {

namespace bdls {
                              // ===============
                              // struct PipeUtil
                              // ===============
struct PipeUtil {
    // This struct contains utility methods for platform-independent named pipe
    // operations.

    static int makeCanonicalName(bsl::string              *pipeName,
                                 const bslstl::StringRef&  baseName);
        // Load into the specified 'pipeName' the system-dependent canonical
        // pipe name corresponding to the specified 'baseName'.  Return 0 on
        // success, and a nonzero value if 'baseName' cannot be part of a pipe
        // name on this system.  On Unix systems, if 'baseName' is not a full
        // path name, the canonical name will be prefixed with the directory
        // specified by the 'SOCKDIR' environment variable if it is set,
        // otherwise with the directory specified by the 'TMPDIR' environment
        // variable if it is set, and otherwise by the current directory.  On
        // Windows systems, if 'baseName' is not a full path name, the
        // canonical name will be prefixed with "\\.\pipe\".

    static int send(const bslstl::StringRef& pipeName,
                    const bslstl::StringRef& message);
{'fraction_non_alphanumeric': 0.16952380952380952, 'fraction_numerical': 0.0009523809523809524, 'mean_word_length': 1.708575112830432, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5876681', 'n_tokens_mistral': 1115, 'n_tokens_neox': 1074, 'n_words': 367}