MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / create

Method create

Libraries/File/File.cpp:1242–1257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1240} // namespace
1241
1242SC::Result SC::NamedPipeServer::create(StringSpan pipeName, NamedPipeServerOptions pipeOptions)
1243{
1244 SC_TRY_MSG(not created, "NamedPipeServer::create already created");
1245 SC_TRY_MSG(name.assign(pipeName), "NamedPipeServer::create invalid pipe name");
1246
1247 const wchar_t* fullName = name.view().getNullTerminatedNative();
1248 SC_TRY_MSG(hasWindowsNamedPipePrefix(fullName),
1249 "NamedPipeServer::create path must start with \\\\.\\pipe\\ or \\\\?\\pipe\\");
1250
1251 options = pipeOptions;
1252 firstInstance = true;
1253 SC_TRY(createPendingServerInstance(name.view(), options, firstInstance, pendingConnection));
1254 firstInstance = false;
1255 created = true;
1256 return Result(true);
1257}
1258
1259SC::Result SC::NamedPipeServer::accept(PipeDescriptor& outConnection)
1260{

Callers

nothing calls this directly

Calls 5

ResultClass · 0.50
assignMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected