go.nanomsg.org/mangos/v3@v3.4.3-0.20240217232803-46464076f1f5/transport/ipc/ipc_options.go (about) 1 // Copyright 2020 The Mangos Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use file except in compliance with the License. 5 // You may obtain a copy of the license at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package ipc 16 17 const ( 18 // OptionIpcSocketPermissions is used to set the permissions on the 19 // UNIX domain socket via chmod. The argument is a uint32, and 20 // represents the mode passed to chmod(). This is 21 // done on the server side. Be aware that relying on 22 // socket permissions for enforcement is not portable. 23 OptionIpcSocketPermissions = "UNIX-IPC-CHMOD" 24 25 // OptionIpcSocketOwner is used to set the socket owner by 26 // using chown on the server socket. This will only work if 27 // the process has permission. The argument is an int. 28 // If this fails to set at socket creation time, 29 // no error is reported. 30 OptionIpcSocketOwner = "UNIX-IPC-OWNER" 31 32 // OptionIpcSocketGroup is used to set the socket group by 33 // using chown on the server socket. This will only work if 34 // the process has permission. The argument is an int. 35 // If this fails to set at socket creation time, 36 // no error is reported. 37 OptionIpcSocketGroup = "UNIX-IPC-GROUP" 38 39 // OptionSecurityDescriptor represents a Windows security 40 // descriptor in SDDL format (string). This can only be set on 41 // a Listener, and must be set before the Listen routine 42 // is called. 43 OptionSecurityDescriptor = "WIN-IPC-SECURITY-DESCRIPTOR" 44 45 // OptionInputBufferSize represents the Windows Named Pipe 46 // input buffer size in bytes (type int32). Default is 4096. 47 // This is only for Listeners, and must be set before the 48 // Listener is started. 49 OptionInputBufferSize = "WIN-IPC-INPUT-BUFFER-SIZE" 50 51 // OptionOutputBufferSize represents the Windows Named Pipe 52 // output buffer size in bytes (type int32). Default is 4096. 53 // This is only for Listeners, and must be set before the 54 // Listener is started. 55 OptionOutputBufferSize = "WIN-IPC-OUTPUT-BUFFER-SIZE" 56 ) 57