' Socket Custom Control
' (C) Copyright 1993, 1994 by Distinct Corporation
' All rights reserved

' actions
Const ACTION_NONE = 0
Const ACTION_CONNECT = 1
Const ACTION_LISTEN = 2
Const ACTION_ACCEPT = 3
Const ACTION_DISCONNECT = 4

' address conversions
Const CONVERT_NONE = 0
Const CONVERT_ADDRESS_TO_NAME = 1
Const CONVERT_NAME_TO_ADDRESS = 2

' protocol and service conversions
' CONVERT_NONE is as defined above
Const PROTO_NAME_TO_NUMBER = 1
Const PROTO_NUMBER_TO_NAME = 2
Const SVC_NAME_TO_PORT = 3
Const SVC_PORT_TO_NAME = 4

' protocols
Const PROTOCOL_TCP = 0
Const PROTOCOL_UDP = 1
Const PROTOCOL_ICMP = 2

' options
Const OPTION_NONE = 0
Const OPTION_BROADCAST_ON = 1
Const OPTION_BROADCAST_OFF = 2
Const OPTION_LINGER_ON = 3
Const OPTION_LINGER_OFF = 4
Const OPTION_KEEPALIVE_ON = 5
Const OPTION_KEEPALIVE_OFF = 6
Const OPTION_REUSEADDR_ON = 7
Const OPTION_REUSEADDR_OFF = 8
Const OPTION_ASYNC_CONNECT_ON = 9
Const OPTION_ASYNC_CONNECT_OFF = 10

' error codes
Const ERR_CHANGE_PROTOCOL = 1
Const ERR_CHANGE_LOCAL_PORT = 2
Const ERR_CHANGE_REMOTE_PORT = 3
Const ERR_CHANGE_RECV_SIZE = 4
Const ERR_CHANGE_SEND_SIZE = 5
Const ERR_CHANGE_HOST_ADDR = 6
Const ERR_NO_HOST_ADDR = 7
Const ERR_CANNOT_GET_SOCKET = 8
Const ERR_CANNOT_BIND_SOCKET = 9
Const ERR_CANNOT_CONNECT_SOCKET = 10
Const ERR_CANNOT_SETUP_SOCKET = 11
Const ERR_CANNOT_LISTEN_SOCKET = 12
Const ERR_ALREADY_CONNECTED = 13
Const ERR_ALREADY_LISTENING = 14
Const ERR_LISTENING_REMOTE_PORT = 15
Const ERR_LISTENING_HOST_ADDR = 16
Const ERR_NOT_LISTENING = 17
Const ERR_CANNOT_ACCEPT = 18
Const ERR_CONNECT_TO_RECV = 19
Const ERR_CONNECT_TO_RECV_COUNT = 20
Const ERR_CONNECT_TO_SEND = 21
Const ERR_CANNOT_SEND = 22
Const ERR_NO_OPTION_VALUE = 23
Const ERR_CANNOT_GET_LOCAL = 24
