1 /* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this 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 16 #ifndef COMMUNICATIONNETSTACK_CONTEXT_KEY_H 17 #define COMMUNICATIONNETSTACK_CONTEXT_KEY_H 18 19 #define KEY_ADDRESS "address" 20 21 #define KEY_FAMILY "family" 22 23 #define KEY_PORT "port" 24 25 #define KEY_TIMEOUT "timeout" 26 27 #define KEY_ENCODING "encoding" 28 29 #define KEY_DATA "data" 30 31 #define KEY_RECEIVE_BUFFER_SIZE "receiveBufferSize" 32 33 #define KEY_SEND_BUFFER_SIZE "sendBufferSize" 34 35 #define KEY_REUSE_ADDRESS "reuseAddress" 36 37 #define KEY_SOCKET_TIMEOUT "socketTimeout" 38 39 #define KEY_BROADCAST "broadcast" 40 41 #define KEY_IS_BOUND "isBound" 42 43 #define KEY_IS_CLOSE "isClose" 44 45 #define KEY_IS_CONNECTED "isConnected" 46 47 #define KEY_SIZE "size" 48 49 #define KEY_KEEP_ALIVE "keepAlive" 50 51 #define KEY_OOB_INLINE "OOBInline" 52 53 #define KEY_TCP_NO_DELAY "TCPNoDelay" 54 55 #define KEY_SOCKET_LINGER "socketLinger" 56 57 #define KEY_SOCKET_LINGER_ON "on" 58 59 #define KEY_SOCKET_LINGER_LINGER "linger" 60 61 #define KEY_ERROR_CODE "code" 62 63 #define KEY_MESSAGE "message" 64 65 #define KEY_REMOTE_INFO "remoteInfo" 66 67 #define PARAM_NONE 0 68 69 #define PARAM_JUST_OPTIONS 1 70 71 #define PARAM_JUST_CALLBACK 1 72 73 #define PARAM_OPTIONS_AND_CALLBACK 2 74 75 #endif /* COMMUNICATIONNETSTACK_CONTEXT_KEY_H */ 76