#  Copyright (c) 2022 bastien.saltel
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

import zmq

# HTTP Scheme
HTTP_SCHEME = "http"
HTTPS_SCHEME = "https"

# HTTP Port
HTTP_PORT = 80
HTTPS_PORT = 443

# HTTP Request Methods
HTTP_METHOD_GET = "get"
HTTP_METHOD_HEAD = "head"
HTTP_METHOD_POST = "post"
HTTP_METHOD_PUT = "put"
HTTP_METHOD_DELETE = "delete"
HTTP_METHOD_CONNECT = "connect"
HTTP_METHOD_OPTIONS = "options"
HTTP_METHOD_TRACE = "trace"
HTTP_METHOD_PATCH = "patch"

# HTTP Headers
HTTP_HEADER_ACCEPT = "Accept"
HTTP_HEADER_ACCEPT_CH = "Accept-CH"
HTTP_HEADER_ACCEPT_CH_LIFETIME = "Accept-CH-Lifetime"
HTTP_HEADER_ACCEPT_CHARSET = "Accept-Charset"
HTTP_HEADER_ACCEPT_ENCODING = "Accept-Encoding"
HTTP_HEADER_ACCEPT_LANGUAGE = "Accept-Language"
HTTP_HEADER_ACCEPT_PATCH = "Accept-Patch"
HTTP_HEADER_ACCEPT_POST = "Accept-Post"
HTTP_HEADER_ACCEPT_RANGES = "Accept-Ranges"
HTTP_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials"
HTTP_HEADER_ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers"
HTTP_HEADER_ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods"
HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin"
HTTP_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS = "Access-Control-Expose-Headers"
HTTP_HEADER_ACCESS_CONTROL_MAX_AGE = "Access-Control-Max-Age"
HTTP_HEADER_ACCESS_CONTROL_REQUEST_HEADERS = "Access-Control-Request-Headers"
HTTP_HEADER_ACCESS_CONTROL_REQUEST_METHOD = "Access-Control-Request-Method"
HTTP_HEADER_AGE = "Age"
HTTP_HEADER_ALLOW = "Allow"
HTTP_HEADER_ALT_SVC = "Alt-Svc"
HTTP_HEADER_AUTHORIZATION = "Authorization"
HTTP_HEADER_CACHE_CONTROL = "Cache-Control"
HTTP_HEADER_CLEAR_SITE_DATA = "Clear-Site-Data"
HTTP_HEADER_CONNECTION = "Connection"
HTTP_HEADER_CONTENT_DISPOSITION = "Content-Disposition"
HTTP_HEADER_CONTENT_DPR = "Content-DPR"
HTTP_HEADER_CONTENT_ENCODING = "Content-Encoding"
HTTP_HEADER_CONTENT_LANGUAGE = "Content-Language"
HTTP_HEADER_CONTENT_LENGTH = "Content-Length"
HTTP_HEADER_CONTENT_LOCATION = "Content-Location"
HTTP_HEADER_CONTENT_RANGE = "Content-Range"
HTTP_HEADER_CONTENT_SECURITY_POLICY = "Content-Security-Policy"
HTTP_HEADER_CONTENT_SECURITY_POLICY_REPORT_ONLY = "Content-Security-Policy-Report-Only"
HTTP_HEADER_CONTENT_TYPE = "Content-Type"
HTTP_HEADER_COOKIE = "Cookie"
HTTP_HEADER_CRITICAL_CH = "Critical-CH"
HTTP_HEADER_CROSS_ORIGIN_EMBEDDER_POLICY = "Cross-Origin-Embedder-Policy"
HTTP_HEADER_CROSS_ORIGIN_OPENER_POLICY = "Cross-Origin-Opener-Policy"
HTTP_HEADER_CROSS_ORIGIN_RESOURCE_POLICY = "Cross-Origin-Resource-Policy"
HTTP_HEADER_DATE = "Date"
HTTP_HEADER_DEVICE_MEMORY = "Device-Memory"
HTTP_HEADER_DIGEST = "Digest"
HTTP_HEADER_DNT = "DNT"
HTTP_HEADER_DOWNLINK = "Downlink"
HTTP_HEADER_DPR = "DPR"
HTTP_HEADER_EARLY_DATA = "Early-Data"
HTTP_HEADER_ECT = "ECT"
HTTP_HEADER_ETAG = "ETag"
HTTP_HEADER_EXPECT = "Expect"
HTTP_HEADER_EXPECT_CT = "Expect-CT"
HTTP_HEADER_EXPIRES = "Expires"
HTTP_HEADER_FORWARDED = "Forwarded"
HTTP_HEADER_FROM = "From"
HTTP_HEADER_HOST = "Host"
HTTP_HEADER_IF_MATCH = "If-Match"
HTTP_HEADER_IF_MODIFIED_SINCE = "If-Modified-Since"
HTTP_HEADER_IF_NONE_MATCH = "If-None-Match"
HTTP_HEADER_IF_RANGE = "If-Range"
HTTP_HEADER_IF_UNMODIFIED_SINCE = "If-Unmodified-Since"
HTTP_HEADER_KEEP_ALIVE = "Keep-Alive"
HTTP_HEADER_LARGE_ALLOCATION = "Large-Allocation"
HTTP_HEADER_LAST_MODIFIED = "Last-Modified"
HTTP_HEADER_LINK = "Link"
HTTP_HEADER_LOCATION = "Location"
HTTP_HEADER_MAX_FORWARDS = "Max-Forwards"
HTTP_HEADER_NEL = "NEL"
HTTP_HEADER_ORIGIN = "Origin"
HTTP_HEADER_PERMISSIONS_POLICY = "Permissions-Policy"
HTTP_HEADER_PRAGMA = "Pragma"
HTTP_HEADER_PROXY_AUTHENTICATE = "Proxy-Authenticate"
HTTP_HEADER_PROXY_AUTHORIZATION = "Proxy-Authorization"
HTTP_HEADER_RANGE = "Range"
HTTP_HEADER_REFERER = "Referer"
HTTP_HEADER_REFERRER_POLICY = "Referrer-Policy"
HTTP_HEADER_RETRY_AFTER = "Retry-After"
HTTP_HEADER_RTT = "RTT"
HTTP_HEADER_SAVE_DATA = "Save-Data"
HTTP_HEADER_SEC_CH_PREFERS_REDUCED_MOTION = "Sec-CH-Prefers-Reduced-Motion"
HTTP_HEADER_SEC_CH_UA = "Sec-CH-UA"
HTTP_HEADER_SEC_CH_UA_ARCH = "Sec-CH-UA-Arch"
HTTP_HEADER_SEC_CH_UA_BITNESS = "Sec-CH-UA-Bitness"
HTTP_HEADER_SEC_CH_UA_FULL_VERSION = "Sec-CH-UA-Full-Version"
HTTP_HEADER_SEC_CH_UA_FULL_VERSION_LIST = "Sec-CH-UA-Full-Version-List"
HTTP_HEADER_SEC_CH_UA_MOBILE = "Sec-CH-UA-Mobile"
HTTP_HEADER_SEC_CH_UA_PLATFORM = "Sec-CH-UA-Platform"
HTTP_HEADER_SEC_CH_UA_PLATFORM_VERSION = "Sec-CH-UA-Platform-Version"
HTTP_HEADER_SEC_FETCH_DEST = "Sec-Fetch-Dest"
HTTP_HEADER_SEC_FETCH_MODE = "Sec-Fetch-Mode"
HTTP_HEADER_SEC_FETCH_SITE = "Sec-Fetch-Site"
HTTP_HEADER_SEC_FETCH_USER = "Sec-Fetch-User"
HTTP_HEADER_SEC_GPC = "Sec-GPC"
HTTP_HEADER_SEC_WEBSOCKET_ACCEPT = "Sec-WebSocket-Accept"
HTTP_HEADER_SERVER = "Server"
HTTP_HEADER_SERVER_TIMING = "Server-Timing"
HTTP_HEADER_SERVICE_WORKER_NAVIGATION_PRELOAD = "Service-Worker-Navigation-Preload"
HTTP_HEADER_SET_COOKIE = "Set-Cookie"
HTTP_HEADER_SOURCEMAP = "SourceMap"
HTTP_HEADER_STRICT_TRANSPORT_SECURITY = "Strict-Transport-Security"
HTTP_HEADER_TE = "TE"
HTTP_HEADER_TIMING_ALLOW_ORIGIN = "Timing-Allow-Origin"
HTTP_HEADER_TK = "Tk"
HTTP_HEADER_TRAILER = "Trailer"
HTTP_HEADER_TRANSFER_ENCODING = "Transfer-Encoding"
HTTP_HEADER_UPGRADE = "Upgrade"
HTTP_HEADER_UPGRADE_INSECURE_REQUESTS = "Upgrade-Insecure-Requests"
HTTP_HEADER_USER_AGENT = "User-Agent"
HTTP_HEADER_VARY = "Vary"
HTTP_HEADER_VIA = "Via"
HTTP_HEADER_VIEWPORT_WIDTH = "Viewport-Width"
HTTP_HEADER_WANT_DIGEST = "Want-Digest"
HTTP_HEADER_WARNING = "Warning"
HTTP_HEADER_WIDTH = "Width"
HTTP_HEADER_WWW_AUTHENTICATE = "WWW-Authenticate"
HTTP_HEADER_X_CONTENT_TYPE_OPTIONS = "X-Content-Type-Options"
HTTP_HEADER_X_DNS_PREFETCH_CONTROL = "X-DNS-Prefetch-Control"
HTTP_HEADER_X_FORWARDED_FOR = "X-Forwarded-For"
HTTP_HEADER_X_FORWARDED_HOST = "X-Forwarded-Host"
HTTP_HEADER_X_FORWARDED_PROTO = "X-Forwarded-Proto"
HTTP_HEADER_X_FRAME_OPTIONS = "X-Frame-Options"
HTTP_HEADER_X_XSS_PROTECTION = "X-XSS-Protection"

HTTP_HEADERS = [
                HTTP_HEADER_ACCEPT,
                HTTP_HEADER_ACCEPT_CH,
                HTTP_HEADER_ACCEPT_CH_LIFETIME,
                HTTP_HEADER_ACCEPT_CHARSET,
                HTTP_HEADER_ACCEPT_ENCODING,
                HTTP_HEADER_ACCEPT_LANGUAGE,
                HTTP_HEADER_ACCEPT_PATCH,
                HTTP_HEADER_ACCEPT_POST,
                HTTP_HEADER_ACCEPT_RANGES,
                HTTP_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS,
                HTTP_HEADER_ACCESS_CONTROL_ALLOW_HEADERS,
                HTTP_HEADER_ACCESS_CONTROL_ALLOW_METHODS,
                HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
                HTTP_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS,
                HTTP_HEADER_ACCESS_CONTROL_MAX_AGE,
                HTTP_HEADER_ACCESS_CONTROL_REQUEST_HEADERS,
                HTTP_HEADER_ACCESS_CONTROL_REQUEST_METHOD,
                HTTP_HEADER_AGE,
                HTTP_HEADER_ALLOW,
                HTTP_HEADER_ALT_SVC,
                HTTP_HEADER_AUTHORIZATION,
                HTTP_HEADER_CACHE_CONTROL,
                HTTP_HEADER_CLEAR_SITE_DATA,
                HTTP_HEADER_CONNECTION,
                HTTP_HEADER_CONTENT_DISPOSITION,
                HTTP_HEADER_CONTENT_DPR,
                HTTP_HEADER_CONTENT_ENCODING,
                HTTP_HEADER_CONTENT_LANGUAGE,
                HTTP_HEADER_CONTENT_LENGTH,
                HTTP_HEADER_CONTENT_LOCATION,
                HTTP_HEADER_CONTENT_RANGE,
                HTTP_HEADER_CONTENT_SECURITY_POLICY,
                HTTP_HEADER_CONTENT_SECURITY_POLICY_REPORT_ONLY,
                HTTP_HEADER_CONTENT_TYPE,
                HTTP_HEADER_COOKIE,
                HTTP_HEADER_CRITICAL_CH,
                HTTP_HEADER_CROSS_ORIGIN_EMBEDDER_POLICY,
                HTTP_HEADER_CROSS_ORIGIN_OPENER_POLICY,
                HTTP_HEADER_CROSS_ORIGIN_RESOURCE_POLICY,
                HTTP_HEADER_DATE,
                HTTP_HEADER_DEVICE_MEMORY,
                HTTP_HEADER_DIGEST,
                HTTP_HEADER_DNT,
                HTTP_HEADER_DOWNLINK,
                HTTP_HEADER_DPR,
                HTTP_HEADER_EARLY_DATA,
                HTTP_HEADER_ECT,
                HTTP_HEADER_ETAG,
                HTTP_HEADER_EXPECT,
                HTTP_HEADER_EXPECT_CT,
                HTTP_HEADER_EXPIRES,
                HTTP_HEADER_FORWARDED,
                HTTP_HEADER_FROM,
                HTTP_HEADER_HOST,
                HTTP_HEADER_IF_MATCH,
                HTTP_HEADER_IF_MODIFIED_SINCE,
                HTTP_HEADER_IF_NONE_MATCH,
                HTTP_HEADER_IF_RANGE,
                HTTP_HEADER_IF_UNMODIFIED_SINCE,
                HTTP_HEADER_KEEP_ALIVE,
                HTTP_HEADER_LARGE_ALLOCATION,
                HTTP_HEADER_LAST_MODIFIED,
                HTTP_HEADER_LINK,
                HTTP_HEADER_LOCATION,
                HTTP_HEADER_MAX_FORWARDS,
                HTTP_HEADER_NEL,
                HTTP_HEADER_ORIGIN,
                HTTP_HEADER_PERMISSIONS_POLICY,
                HTTP_HEADER_PRAGMA,
                HTTP_HEADER_PROXY_AUTHENTICATE,
                HTTP_HEADER_PROXY_AUTHORIZATION,
                HTTP_HEADER_RANGE,
                HTTP_HEADER_REFERER,
                HTTP_HEADER_REFERRER_POLICY,
                HTTP_HEADER_RETRY_AFTER,
                HTTP_HEADER_RTT,
                HTTP_HEADER_SAVE_DATA,
                HTTP_HEADER_SEC_CH_PREFERS_REDUCED_MOTION,
                HTTP_HEADER_SEC_CH_UA,
                HTTP_HEADER_SEC_CH_UA_ARCH,
                HTTP_HEADER_SEC_CH_UA_BITNESS,
                HTTP_HEADER_SEC_CH_UA_FULL_VERSION,
                HTTP_HEADER_SEC_CH_UA_FULL_VERSION_LIST,
                HTTP_HEADER_SEC_CH_UA_MOBILE,
                HTTP_HEADER_SEC_CH_UA_PLATFORM,
                HTTP_HEADER_SEC_CH_UA_PLATFORM_VERSION,
                HTTP_HEADER_SEC_FETCH_DEST,
                HTTP_HEADER_SEC_FETCH_MODE,
                HTTP_HEADER_SEC_FETCH_SITE,
                HTTP_HEADER_SEC_FETCH_USER,
                HTTP_HEADER_SEC_GPC,
                HTTP_HEADER_SEC_WEBSOCKET_ACCEPT,
                HTTP_HEADER_SERVER,
                HTTP_HEADER_SERVER_TIMING,
                HTTP_HEADER_SERVICE_WORKER_NAVIGATION_PRELOAD,
                HTTP_HEADER_SET_COOKIE,
                HTTP_HEADER_SOURCEMAP,
                HTTP_HEADER_STRICT_TRANSPORT_SECURITY,
                HTTP_HEADER_TE,
                HTTP_HEADER_TIMING_ALLOW_ORIGIN,
                HTTP_HEADER_TK,
                HTTP_HEADER_TRAILER,
                HTTP_HEADER_TRANSFER_ENCODING,
                HTTP_HEADER_UPGRADE,
                HTTP_HEADER_UPGRADE_INSECURE_REQUESTS,
                HTTP_HEADER_USER_AGENT,
                HTTP_HEADER_VARY,
                HTTP_HEADER_VIA,
                HTTP_HEADER_VIEWPORT_WIDTH,
                HTTP_HEADER_WANT_DIGEST,
                HTTP_HEADER_WARNING,
                HTTP_HEADER_WIDTH,
                HTTP_HEADER_WWW_AUTHENTICATE,
                HTTP_HEADER_X_CONTENT_TYPE_OPTIONS,
                HTTP_HEADER_X_DNS_PREFETCH_CONTROL,
                HTTP_HEADER_X_FORWARDED_FOR,
                HTTP_HEADER_X_FORWARDED_HOST,
                HTTP_HEADER_X_FORWARDED_PROTO,
                HTTP_HEADER_X_FRAME_OPTIONS,
                HTTP_HEADER_X_XSS_PROTECTION
               ]

# ZeroMq Types
ZMQ_TYPE_PAIR = "PAIR"
ZMQ_TYPE_PUB = "PUB"
ZMQ_TYPE_SUB = "SUB"
ZMQ_TYPE_REQ = "REQ"
ZMQ_TYPE_REP = "REP"
ZMQ_TYPE_DEALER = "DEALER"
ZMQ_TYPE_ROUTER = "ROUTER"
ZMQ_TYPE_PULL = "PULL"
ZMQ_TYPE_PUSH = "PUSH"
ZMQ_TYPE_XPUB = "XPUB"
ZMQ_TYPE_XSUB = "XSUB"
ZMQ_TYPE_STREAM = "STREAM"
ZMQ_TYPE_XREQ = "XREQ"
ZMQ_TYPE_XREP = "XREP"
ZMQ_TYPE_SERVER = "SERVER"
ZMQ_TYPE_CLIENT = "CLIENT"
ZMQ_TYPE_RADIO = "RADIO"
ZMQ_TYPE_DISH = "DISH"
ZMQ_TYPE_GATHER = "GATHER"
ZMQ_TYPE_SCATTER = "SCATTER"
ZMQ_TYPE_DGRAM = "DGRAM"
ZMQ_TYPE_PEER = "PEER"
ZMQ_TYPE_CHANNEL = "CHANNEL"

ZMQ_TYPES = {
             ZMQ_TYPE_PAIR: zmq.PAIR,
             ZMQ_TYPE_PUB: zmq.PUB,
             ZMQ_TYPE_SUB: zmq.SUB,
             ZMQ_TYPE_REQ: zmq.REQ,
             ZMQ_TYPE_REP: zmq.REP,
             ZMQ_TYPE_DEALER: zmq.DEALER,
             ZMQ_TYPE_ROUTER: zmq.ROUTER,
             ZMQ_TYPE_PULL: zmq.PULL,
             ZMQ_TYPE_PUSH: zmq.PUSH,
             ZMQ_TYPE_XPUB: zmq.XPUB,
             ZMQ_TYPE_XSUB: zmq.XSUB,
             ZMQ_TYPE_STREAM: zmq.STREAM,
             ZMQ_TYPE_XREQ: zmq.XREQ,
             ZMQ_TYPE_XREP: zmq.XREP,
             ZMQ_TYPE_SERVER: zmq.SERVER,
             ZMQ_TYPE_RADIO: zmq.RADIO,
             ZMQ_TYPE_DISH: zmq.DISH,
             ZMQ_TYPE_GATHER: zmq.GATHER,
             ZMQ_TYPE_SCATTER: zmq.SCATTER,
             ZMQ_TYPE_DGRAM: zmq.DGRAM,
             ZMQ_TYPE_PEER: zmq.PEER,
             ZMQ_TYPE_CHANNEL: zmq.CHANNEL
            }

# ZeroMq Socket Options
ZMQ_HWM = "HWM"
ZMQ_AFFINITY = "AFFINITY"
ZMQ_ROUTING_ID = "ROUTING_ID"
ZMQ_SUBSCRIBE = "SUBSCRIBE"
ZMQ_UNSUBSCRIBE = "UNSUBSCRIBE"
ZMQ_RATE = "RATE"
ZMQ_RECOVERY_IVL = "RECOVERY_IVL"
ZMQ_SNDBUF = "SNDBUF"
ZMQ_RCVBUF = "RCVBUF"
ZMQ_RCVMORE = "RCVMORE"
ZMQ_FD = "FD"
ZMQ_EVENTS = "EVENTS"
ZMQ_TYPE = "TYPE"
ZMQ_LINGER = "LINGER"
ZMQ_RECONNECT_IVL = "RECONNECT_IVL"
ZMQ_BACKLOG = "BACKLOG"
ZMQ_RECONNECT_IVL_MAX = "RECONNECT_IVL_MAX"
ZMQ_MAXMSGSIZE = "MAXMSGSIZE"
ZMQ_SNDHWM = "SNDHWM"
ZMQ_RCVHWM = "RCVHWM"
ZMQ_MULTICAST_HOPS = "MULTICAST_HOPS"
ZMQ_RCVTIMEO = "RCVTIMEO"
ZMQ_SNDTIMEO = "SNDTIMEO"
ZMQ_LAST_ENDPOINT = "LAST_ENDPOINT"
ZMQ_ROUTER_MANDATORY = "ROUTER_MANDATORY"
ZMQ_TCP_KEEPALIVE = "TCP_KEEPALIVE"
ZMQ_TCP_KEEPALIVE_CNT = "TCP_KEEPALIVE_CNT"
ZMQ_TCP_KEEPALIVE_IDLE = "TCP_KEEPALIVE_IDLE"
ZMQ_TCP_KEEPALIVE_INTVL = "TCP_KEEPALIVE_INTVL"
ZMQ_IMMEDIATE = "IMMEDIATE"
ZMQ_XPUB_VERBOSE = "XPUB_VERBOSE"
ZMQ_ROUTER_RAW = "ROUTER_RAW"
ZMQ_IPV6 = "IPV6"
ZMQ_MECHANISM = "MECHANISM"
ZMQ_PLAIN_SERVER = "PLAIN_SERVER"
ZMQ_PLAIN_USERNAME = "PLAIN_USERNAME"
ZMQ_PLAIN_PASSWORD = "PLAIN_PASSWORD"
ZMQ_CURVE_SERVER = "CURVE_SERVER"
ZMQ_CURVE_PUBLICKEY = "CURVE_PUBLICKEY"
ZMQ_CURVE_SECRETKEY = "CURVE_SECRETKEY"
ZMQ_CURVE_SERVERKEY = "CURVE_SERVERKEY"
ZMQ_PROBE_ROUTER = "PROBE_ROUTER"
ZMQ_REQ_CORRELATE = "REQ_CORRELATE"
ZMQ_REQ_RELAXED = "REQ_RELAXED"
ZMQ_CONFLATE = "CONFLATE"
ZMQ_ZAP_DOMAIN = "ZAP_DOMAIN"
ZMQ_ROUTER_HANDOVER = "ROUTER_HANDOVER"
ZMQ_TOS = "TOS"
ZMQ_CONNECT_ROUTING_ID = "CONNECT_ROUTING_ID"
ZMQ_GSSAPI_SERVER = "GSSAPI_SERVER"
ZMQ_GSSAPI_PRINCIPAL = "GSSAPI_PRINCIPAL"
ZMQ_GSSAPI_SERVICE_PRINCIPAL = "GSSAPI_SERVICE_PRINCIPAL"
ZMQ_GSSAPI_PLAINTEXT = "GSSAPI_PLAINTEXT"
ZMQ_HANDSHAKE_IVL = "HANDSHAKE_IVL"
ZMQ_SOCKS_PROXY = "SOCKS_PROXY"
ZMQ_XPUB_NODROP = "XPUB_NODROP"
ZMQ_BLOCKY = "BLOCKY"
ZMQ_XPUB_MANUAL = "XPUB_MANUAL"
ZMQ_XPUB_WELCOME_MSG = "XPUB_WELCOME_MSG"
ZMQ_STREAM_NOTIFY = "STREAM_NOTIFY"
ZMQ_INVERT_MATCHING = "INVERT_MATCHING"
ZMQ_HEARTBEAT_IVL = "HEARTBEAT_IVL"
ZMQ_HEARTBEAT_TTL = "HEARTBEAT_TTL"
ZMQ_HEARTBEAT_TIMEOUT = "HEARTBEAT_TIMEOUT"
ZMQ_XPUB_VERBOSER = "XPUB_VERBOSER"
ZMQ_CONNECT_TIMEOUT = "CONNECT_TIMEOUT"
ZMQ_TCP_MAXRT = "TCP_MAXRT"
ZMQ_THREAD_SAFE = "THREAD_SAFE"
ZMQ_MULTICAST_MAXTPDU = "MULTICAST_MAXTPDU"
ZMQ_VMCI_BUFFER_SIZE = "VMCI_BUFFER_SIZE"
ZMQ_VMCI_BUFFER_MIN_SIZE = "VMCI_BUFFER_MIN_SIZE"
ZMQ_VMCI_BUFFER_MAX_SIZE = "VMCI_BUFFER_MAX_SIZE"
ZMQ_VMCI_CONNECT_TIMEOUT = "VMCI_CONNECT_TIMEOUT"
ZMQ_USE_FD = "USE_FD"
ZMQ_GSSAPI_PRINCIPAL_NAMETYPE = "GSSAPI_PRINCIPAL_NAMETYPE"
ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE = "GSSAPI_SERVICE_PRINCIPAL_NAMETYPE"
ZMQ_BINDTODEVICE = "BINDTODEVICE"
ZMQ_IDENTITY = "IDENTITY"
ZMQ_CONNECT_RID = "CONNECT_RID"
ZMQ_TCP_ACCEPT_FILTER = "TCP_ACCEPT_FILTER"
ZMQ_IPC_FILTER_PID = "IPC_FILTER_PID"
ZMQ_IPC_FILTER_UID = "IPC_FILTER_UID"
ZMQ_IPC_FILTER_GID = "IPC_FILTER_GID"
ZMQ_IPV4ONLY = "IPV4ONLY"
ZMQ_DELAY_ATTACH_ON_CONNECT = "DELAY_ATTACH_ON_CONNECT"
ZMQ_FAIL_UNROUTABLE = "FAIL_UNROUTABLE"
ZMQ_ROUTER_BEHAVIOR = "ROUTER_BEHAVIOR"
ZMQ_ZAP_ENFORCE_DOMAIN = "ZAP_ENFORCE_DOMAIN"
ZMQ_LOOPBACK_FASTPATH = "LOOPBACK_FASTPATH"
ZMQ_METADATA = "METADATA"
ZMQ_MULTICAST_LOOP = "MULTICAST_LOOP"
ZMQ_ROUTER_NOTIFY = "ROUTER_NOTIFY"
ZMQ_XPUB_MANUAL_LAST_VALUE = "XPUB_MANUAL_LAST_VALUE"
ZMQ_SOCKS_USERNAME = "SOCKS_USERNAME"
ZMQ_SOCKS_PASSWORD = "SOCKS_PASSWORD"
ZMQ_IN_BATCH_SIZE = "IN_BATCH_SIZE"
ZMQ_OUT_BATCH_SIZE = "OUT_BATCH_SIZE"
ZMQ_WSS_KEY_PEM = "WSS_KEY_PEM"
ZMQ_WSS_CERT_PEM = "WSS_CERT_PEM"
ZMQ_WSS_TRUST_PEM = "WSS_TRUST_PEM"
ZMQ_WSS_HOSTNAME = "WSS_HOSTNAME"
ZMQ_WSS_TRUST_SYSTEM = "WSS_TRUST_SYSTEM"
ZMQ_ONLY_FIRST_SUBSCRIBE = "ONLY_FIRST_SUBSCRIBE"
ZMQ_RECONNECT_STOP = "RECONNECT_STOP"
ZMQ_HELLO_MSG = "HELLO_MSG"
ZMQ_DISCONNECT_MSG = "DISCONNECT_MSG"
ZMQ_PRIORITY = "PRIORITY"

ZMQ_SOCKET_OPTIONS = {
                      ZMQ_HWM: zmq.HWM,
                      ZMQ_AFFINITY: zmq.AFFINITY,
                      ZMQ_ROUTING_ID: zmq.ROUTING_ID,
                      ZMQ_SUBSCRIBE: zmq.SUBSCRIBE,
                      ZMQ_UNSUBSCRIBE: zmq.UNSUBSCRIBE,
                      ZMQ_RATE: zmq.RATE,
                      ZMQ_RECOVERY_IVL: zmq.RECOVERY_IVL,
                      ZMQ_SNDBUF: zmq.SNDBUF,
                      ZMQ_RCVBUF: zmq.RCVBUF,
                      ZMQ_RCVMORE: zmq.RCVMORE,
                      ZMQ_FD: zmq.FD,
                      ZMQ_EVENTS: zmq.EVENTS,
                      ZMQ_TYPE: zmq.TYPE,
                      ZMQ_LINGER: zmq.LINGER,
                      ZMQ_RECONNECT_IVL: zmq.RECONNECT_IVL,
                      ZMQ_BACKLOG: zmq.BACKLOG,
                      ZMQ_RECONNECT_IVL_MAX: zmq.RECONNECT_IVL_MAX,
                      ZMQ_MAXMSGSIZE: zmq.MAXMSGSIZE,
                      ZMQ_SNDHWM: zmq.SNDHWM,
                      ZMQ_RCVHWM: zmq.RCVHWM,
                      ZMQ_MULTICAST_HOPS: zmq.MULTICAST_HOPS,
                      ZMQ_RCVTIMEO: zmq.RCVTIMEO,
                      ZMQ_SNDTIMEO: zmq.SNDTIMEO,
                      ZMQ_LAST_ENDPOINT: zmq.LAST_ENDPOINT,
                      ZMQ_ROUTER_MANDATORY: zmq.ROUTER_MANDATORY,
                      ZMQ_TCP_KEEPALIVE: zmq.TCP_KEEPALIVE,
                      ZMQ_TCP_KEEPALIVE_CNT: zmq.TCP_KEEPALIVE_CNT,
                      ZMQ_TCP_KEEPALIVE_IDLE: zmq.TCP_KEEPALIVE_IDLE,
                      ZMQ_TCP_KEEPALIVE_INTVL: zmq.TCP_KEEPALIVE_INTVL,
                      ZMQ_IMMEDIATE: zmq.IMMEDIATE,
                      ZMQ_XPUB_VERBOSE: zmq.XPUB_VERBOSE,
                      ZMQ_ROUTER_RAW: zmq.ROUTER_RAW,
                      ZMQ_IPV6: zmq.IPV6,
                      ZMQ_MECHANISM: zmq.MECHANISM,
                      ZMQ_PLAIN_SERVER: zmq.PLAIN_SERVER,
                      ZMQ_PLAIN_USERNAME: zmq.PLAIN_USERNAME,
                      ZMQ_PLAIN_PASSWORD: zmq.PLAIN_PASSWORD,
                      ZMQ_CURVE_SERVER: zmq.CURVE_SERVER,
                      ZMQ_CURVE_PUBLICKEY: zmq.CURVE_PUBLICKEY,
                      ZMQ_CURVE_SECRETKEY: zmq.CURVE_SECRETKEY,
                      ZMQ_CURVE_SERVERKEY: zmq.CURVE_SERVERKEY,
                      ZMQ_PROBE_ROUTER: zmq.PROBE_ROUTER,
                      ZMQ_REQ_CORRELATE: zmq.REQ_CORRELATE,
                      ZMQ_REQ_RELAXED: zmq.REQ_RELAXED,
                      ZMQ_CONFLATE: zmq.CONFLATE,
                      ZMQ_ZAP_DOMAIN: zmq.ZAP_DOMAIN,
                      ZMQ_ROUTER_HANDOVER: zmq.ROUTER_HANDOVER,
                      ZMQ_TOS: zmq.TOS,
                      ZMQ_CONNECT_ROUTING_ID: zmq.CONNECT_ROUTING_ID,
                      ZMQ_GSSAPI_SERVER: zmq.GSSAPI_SERVER,
                      ZMQ_GSSAPI_PRINCIPAL: zmq.GSSAPI_PRINCIPAL,
                      ZMQ_GSSAPI_SERVICE_PRINCIPAL: zmq.GSSAPI_SERVICE_PRINCIPAL,
                      ZMQ_GSSAPI_PLAINTEXT: zmq.GSSAPI_PLAINTEXT,
                      ZMQ_HANDSHAKE_IVL: zmq.HANDSHAKE_IVL,
                      ZMQ_SOCKS_PROXY: zmq.SOCKS_PROXY,
                      ZMQ_XPUB_NODROP: zmq.XPUB_NODROP,
                      ZMQ_BLOCKY: zmq.BLOCKY,
                      ZMQ_XPUB_MANUAL: zmq.XPUB_MANUAL,
                      ZMQ_XPUB_WELCOME_MSG: zmq.XPUB_WELCOME_MSG,
                      ZMQ_STREAM_NOTIFY: zmq.STREAM_NOTIFY,
                      ZMQ_INVERT_MATCHING: zmq.INVERT_MATCHING,
                      ZMQ_HEARTBEAT_IVL: zmq.HEARTBEAT_IVL,
                      ZMQ_HEARTBEAT_TTL: zmq.HEARTBEAT_TTL,
                      ZMQ_HEARTBEAT_TIMEOUT: zmq.HEARTBEAT_TIMEOUT,
                      ZMQ_XPUB_VERBOSER: zmq.XPUB_VERBOSER,
                      ZMQ_CONNECT_TIMEOUT: zmq.CONNECT_TIMEOUT,
                      ZMQ_TCP_MAXRT: zmq.TCP_MAXRT,
                      ZMQ_THREAD_SAFE: zmq.THREAD_SAFE,
                      ZMQ_MULTICAST_MAXTPDU: zmq.MULTICAST_MAXTPDU,
                      ZMQ_VMCI_BUFFER_SIZE: zmq.VMCI_BUFFER_SIZE,
                      ZMQ_VMCI_BUFFER_MIN_SIZE: zmq.VMCI_BUFFER_MIN_SIZE,
                      ZMQ_VMCI_BUFFER_MAX_SIZE: zmq.VMCI_BUFFER_MAX_SIZE,
                      ZMQ_VMCI_CONNECT_TIMEOUT: zmq.VMCI_CONNECT_TIMEOUT,
                      ZMQ_USE_FD: zmq.USE_FD,
                      ZMQ_GSSAPI_PRINCIPAL_NAMETYPE: zmq.GSSAPI_PRINCIPAL_NAMETYPE,
                      ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE: zmq.GSSAPI_SERVICE_PRINCIPAL_NAMETYPE,
                      ZMQ_BINDTODEVICE: zmq.BINDTODEVICE,
                      ZMQ_IDENTITY: zmq.IDENTITY,
                      ZMQ_CONNECT_RID: zmq.CONNECT_RID,
                      ZMQ_TCP_ACCEPT_FILTER: zmq.TCP_ACCEPT_FILTER,
                      ZMQ_IPC_FILTER_PID: zmq.IPC_FILTER_PID,
                      ZMQ_IPC_FILTER_UID: zmq.IPC_FILTER_UID,
                      ZMQ_IPC_FILTER_GID: zmq.IPC_FILTER_GID,
                      ZMQ_IPV4ONLY: zmq.IPV4ONLY,
                      ZMQ_DELAY_ATTACH_ON_CONNECT: zmq.DELAY_ATTACH_ON_CONNECT,
                      ZMQ_FAIL_UNROUTABLE: zmq.FAIL_UNROUTABLE,
                      ZMQ_ROUTER_BEHAVIOR: zmq.ROUTER_BEHAVIOR,
                      ZMQ_ZAP_ENFORCE_DOMAIN: zmq.ZAP_ENFORCE_DOMAIN,
                      ZMQ_LOOPBACK_FASTPATH: zmq.LOOPBACK_FASTPATH,
                      ZMQ_METADATA: zmq.METADATA,
                      ZMQ_MULTICAST_LOOP: zmq.MULTICAST_LOOP,
                      ZMQ_ROUTER_NOTIFY: zmq.ROUTER_NOTIFY,
                      ZMQ_XPUB_MANUAL_LAST_VALUE: zmq.XPUB_MANUAL_LAST_VALUE,
                      ZMQ_SOCKS_USERNAME: zmq.SOCKS_USERNAME,
                      ZMQ_SOCKS_PASSWORD: zmq.SOCKS_PASSWORD,
                      ZMQ_IN_BATCH_SIZE: zmq.IN_BATCH_SIZE,
                      ZMQ_OUT_BATCH_SIZE: zmq.OUT_BATCH_SIZE,
                      ZMQ_WSS_KEY_PEM: zmq.WSS_KEY_PEM,
                      ZMQ_WSS_CERT_PEM: zmq.WSS_CERT_PEM,
                      ZMQ_WSS_TRUST_PEM: zmq.WSS_TRUST_PEM,
                      ZMQ_WSS_HOSTNAME: zmq.WSS_HOSTNAME,
                      ZMQ_WSS_TRUST_SYSTEM: zmq.WSS_TRUST_SYSTEM,
                      ZMQ_ONLY_FIRST_SUBSCRIBE: zmq.ONLY_FIRST_SUBSCRIBE,
                      ZMQ_RECONNECT_STOP: zmq.RECONNECT_STOP,
                      ZMQ_HELLO_MSG: zmq.HELLO_MSG,
                      ZMQ_DISCONNECT_MSG: zmq.DISCONNECT_MSG,
                      ZMQ_PRIORITY: zmq.PRIORITY
                     }
