| 1240 | } // namespace |
| 1241 | |
| 1242 | SC::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 | |
| 1259 | SC::Result SC::NamedPipeServer::accept(PipeDescriptor& outConnection) |
| 1260 | { |
nothing calls this directly
no test coverage detected