Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:
note description: "Generic sockets" legal: "See notice at end of class." status: "See notice at end of class." date: "$Date: 2020-05-19 06:37:33 -0800 (Tue, 19 May 2020) $" revision: "$Revision: 104263 $" deferred class interface SOCKET feature -- Access Check_instruction: INTEGER_32 = 7 -- Exception code for violated check -- (from EXCEP_CONST) Class_invariant: INTEGER_32 = 6 -- Exception code for violated class invariant -- (from EXCEP_CONST) Com_exception: INTEGER_32 = 28 -- Exception code for a COM error. -- (from EXCEP_CONST) Create_on_deferred: INTEGER_32 = 17 -- Create on deferred -- (from EXCEP_CONST) Developer_exception: INTEGER_32 = 24 -- Exception code for developer exception -- (from EXCEP_CONST) Dollar_applied_to_melted_feature: INTEGER_32 = 26 -- $ applied to melted feature -- (from EXCEP_CONST) Eiffel_runtime_fatal_error: INTEGER_32 = 25 -- Eiffel run-time fatal error -- (from EXCEP_CONST) Eiffel_runtime_panic: INTEGER_32 = 13 -- Eiffel run-time panic -- (from EXCEP_CONST) Exception_in_signal_handler: INTEGER_32 = 20 -- Exception in signal handler -- (from EXCEP_CONST) Exception_manager: EXCEPTION_MANAGER -- Exception manager -- (from EXCEPTION_MANAGER_FACTORY) ensure -- from EXCEPTION_MANAGER_FACTORY instance_free: class exception_manager_not_void: Result /= Void External_exception: INTEGER_32 = 18 -- Exception code for operating system error -- which does not set the errno variable -- (Unix-specific) -- (from EXCEP_CONST) Floating_point_exception: INTEGER_32 = 5 -- Exception code for floating point exception -- (from EXCEP_CONST) generating_type: TYPE [detachable SOCKET] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty Incorrect_inspect_value: INTEGER_32 = 9 -- Exception code for inspect value which is not one -- of the inspect constants, if there is no Else_part -- (from EXCEP_CONST) Io_exception: INTEGER_32 = 21 -- Exception code for I/O error -- (from EXCEP_CONST) Loop_invariant: INTEGER_32 = 11 -- Exception code for violated loop invariant -- (from EXCEP_CONST) Loop_variant: INTEGER_32 = 10 -- Exception code for non-decreased loop variant -- (from EXCEP_CONST) No_more_memory: INTEGER_32 = 2 -- Exception code for failed memory allocation -- (from EXCEP_CONST) Number_of_codes: INTEGER_32 = 31 -- How many codes are there to represent exceptions? -- (from EXCEP_CONST) Old_exception: INTEGER_32 = 30 -- Old exception code. -- (from EXCEP_CONST) Operating_system_exception: INTEGER_32 = 22 -- Exception code for operating system error -- which sets the errno variable -- (Unix-specific) -- (from EXCEP_CONST) Out_of_memory: INTEGER_32 = 15 -- Out of memory (cannot be ignored) -- (from EXCEP_CONST) Postcondition: INTEGER_32 = 4 -- Exception code for violated postcondition -- (from EXCEP_CONST) Precondition: INTEGER_32 = 3 -- Exception code for violated precondition -- (from EXCEP_CONST) Rescue_exception: INTEGER_32 = 14 -- Exception code for exception in rescue clause -- (from EXCEP_CONST) Resumption_failed: INTEGER_32 = 16 -- Resumption failed (retry did not succeed) -- (from EXCEP_CONST) Retrieve_exception: INTEGER_32 = 23 -- Exception code for retrieval error -- may be raised by `retrieved` in IO_MEDIUM. -- (from EXCEP_CONST) retrieved: detachable ANY -- Retrieved object structure -- To access resulting object under correct type, -- use assignment attempt. -- Will raise an exception (code `retrieve_exception`) -- if content is not a stored Eiffel structure. require -- from IO_MEDIUM is_readable: readable support_storable: support_storable Routine_failure: INTEGER_32 = 8 -- Exception code for failed routine -- (from EXCEP_CONST) Runtime_check_exception: INTEGER_32 = 29 -- Exception code for runtime check being violated. -- (from EXCEP_CONST) Runtime_io_exception: INTEGER_32 = 27 -- Exception code for I/O error raised by runtime functions -- such as store/retrieve, file access... -- (from EXCEP_CONST) Serialization_exception: INTEGER_32 = 31 -- Serialization exception code. -- (from EXCEP_CONST) Signal_exception: INTEGER_32 = 12 -- Exception code for operating system signal -- (from EXCEP_CONST) valid_code (c: INTEGER_32): BOOLEAN -- Is c a valid code to represent some kind of exceptions? -- (from EXCEP_CONST) Void_assigned_to_expanded: INTEGER_32 = 19 -- Exception code for assignment of void value -- to expanded entity -- (from EXCEP_CONST) Void_call_target: INTEGER_32 = 1 -- Exception code for feature applied to void reference -- (from EXCEP_CONST) feature -- Comparison frozen deep_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY instance_free: class shallow_implies_deep: standard_equal (a, b) implies Result both_or_none_void: (a = Void) implies (Result = (b = Void)) same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b)) symmetric: Result implies deep_equal (b, a) frozen equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal alias "≡≡≡" (other: SOCKET): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) is_equal (other: SOCKET): BOOLEAN -- Is other attached to an object considered -- equal to current object? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result frozen standard_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached to -- field-by-field identical objects of the same type? -- Always uses default object comparison criterion. -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b)) frozen standard_is_equal alias "" (other: SOCKET): BOOLEAN -- Is other attached to an object of the same type -- as current object, and field-by-field identical to it? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) feature -- Status report address_in_use: BOOLEAN -- Address is in use by another socket. -- (from SOCKET_RESOURCES) address_not_readable: BOOLEAN -- Unreadable address -- (from SOCKET_RESOURCES) already_bound: BOOLEAN -- Socket has already been bound. -- (from SOCKET_RESOURCES) assertion_violation: BOOLEAN -- Is last exception originally due to a violated -- assertion or non-decreasing variant? -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class bad_socket_handle: BOOLEAN -- Socket descriptor is bad. -- (from SOCKET_RESOURCES) bytes_read: INTEGER_32 -- Last number of bytes read by `read_to_managed_pointer`. -- (from IO_MEDIUM) class_name: detachable STRING_8 -- Name of the class that includes the recipient -- of original form of last exception -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class conforms_to (other: ANY): BOOLEAN -- Does type of current object conform to type -- of other (as per Eiffel: The Language, chapter 13)? -- (from ANY) require -- from ANY other_not_void: other /= Void connect_in_progress: BOOLEAN -- Call to connect returned on a non-blocking socket. -- (from SOCKET_RESOURCES) connection_refused: BOOLEAN -- Connection is refused (possibly due to security). -- (from SOCKET_RESOURCES) developer_exception_name: detachable STRING_8 -- Name of last developer-raised exception -- (from EXCEPTIONS) require -- from EXCEPTIONS applicable: is_developer_exception ensure -- from EXCEPTIONS instance_free: class dtable_full: BOOLEAN -- Descriptor table is full -- (from SOCKET_RESOURCES) error: STRING_8 -- Output a related error message. error_number: INTEGER_32 -- Returned error number -- (from SOCKET_RESOURCES) exception: INTEGER_32 -- Code of last exception that occurred -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class exception_trace: detachable STRING_8 -- String representation of the exception trace -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class expired_socket: BOOLEAN -- Socket connection has expired. -- (from SOCKET_RESOURCES) descriptor: INTEGER_32 -- Handle to medium -- (from IO_MEDIUM) require -- from IO_MEDIUM valid_handle: descriptor_available invalid_address: BOOLEAN -- Address is not valid. -- (from SOCKET_RESOURCES) invalid_socket_handle: BOOLEAN -- Socket descriptor is not valid. -- (from SOCKET_RESOURCES) is_developer_exception: BOOLEAN -- Is the last exception originally due to -- a developer exception? -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class is_developer_exception_of_name (name: detachable STRING_8): BOOLEAN -- Is the last exception originally due to a developer -- exception of name `name`? -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class is_plain_text: BOOLEAN -- Is file reserved for text (character sequences)? -- (from IO_MEDIUM) is_signal: BOOLEAN -- Is last exception originally due to an external -- event (operating system signal)? -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class is_system_exception: BOOLEAN -- Is last exception originally due to an -- external event (operating system error)? -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class is_valid_family (addr: attached like address): BOOLEAN -- Is addr the same family as Current? require address_exists: addr /= Void is_valid_peer_address (addr: attached separate like address): BOOLEAN -- Is addr a valid peer address? require address_exists: addr /= Void last_character: CHARACTER_8 -- Last character read by `read_character`. -- (from IO_MEDIUM) last_double: REAL_64 -- Last double read by `read_double` -- (from IO_MEDIUM) last_integer: INTEGER_32 -- Last integer read by `read_integer` -- (from IO_MEDIUM) last_integer_16: INTEGER_16 -- Last 16-bit integer read by `read_integer_16` -- (from IO_MEDIUM) last_integer_32: INTEGER_32 -- Synonymy of `last_integer` -- (from IO_MEDIUM) last_integer_64: INTEGER_64 -- Last 64-bit integer read by `read_integer_64` -- (from IO_MEDIUM) last_integer_8: INTEGER_8 -- Last 8-bit integer read by `read_integer_8` -- (from IO_MEDIUM) last_natural: NATURAL_32 -- Last 32-bit natural read by `read_natural` -- (from IO_MEDIUM) last_natural_16: NATURAL_16 -- Last 16-bit natural read by `read_natural_16` -- (from IO_MEDIUM) last_natural_32: NATURAL_32 -- Synonymy of `last_natural` -- (from IO_MEDIUM) last_natural_64: NATURAL_64 -- Last 64-bit natural read by `read_natural_64` -- (from IO_MEDIUM) last_natural_8: NATURAL_8 -- Last 8-bit natural read by `read_natural_8` -- (from IO_MEDIUM) last_real: REAL_32 -- Last real read by `read_real` -- (from IO_MEDIUM) last_real_32: REAL_32 -- Last 32-bit real read by `read_real_32`. -- Synonym of `last_real`. -- (from IO_MEDIUM) last_real_64: REAL_64 -- Last 64-bit real read by `read_real_64`. -- Synonym of `last_double`. -- (from IO_MEDIUM) last_string: STRING_8 -- Last string read -- (from IO_MEDIUM) meaning (except: INTEGER_32): detachable STRING_8 -- A message in English describing what except is -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class network: BOOLEAN -- Socket failed due to network problems. -- (from SOCKET_RESOURCES) no_buffers: BOOLEAN -- No more buffers available -- (from SOCKET_RESOURCES) no_permission: BOOLEAN -- No permission is given to user for this socket. -- (from SOCKET_RESOURCES) not_connected: BOOLEAN -- Socket is not connect. -- (from SOCKET_RESOURCES) original_class_name: detachable STRING_8 -- Name of the class that includes the recipient -- of original form of last exception -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class original_exception: INTEGER_32 -- Original code of last exception that triggered -- current exception -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class original_recipient_name: detachable STRING_8 -- Name of the routine whose execution was -- interrupted by original form of last exception -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class original_tag_name: detachable STRING_8 -- Assertion tag for original form of last -- assertion violation. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class protected_address: BOOLEAN -- No access to this address is allowed. -- (from SOCKET_RESOURCES) protocol_not_supported: BOOLEAN -- Protocol is not supported on this platform. -- (from SOCKET_RESOURCES) recipient_name: detachable STRING_8 -- Name of the routine whose execution was -- interrupted by last exception -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class same_type (other: ANY): BOOLEAN -- Is type of current object identical to type of other? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) socket_family_not_supported: BOOLEAN -- Requested family is not supported. -- (from SOCKET_RESOURCES) socket_in_use: BOOLEAN -- Socket is already in use. -- (from SOCKET_RESOURCES) socket_ok: BOOLEAN -- No error socket_would_block: BOOLEAN -- Call to read, write, etc would have blocked. -- (from SOCKET_RESOURCES) support_storable: BOOLEAN -- Can medium be used to store an Eiffel structure? tag_name: detachable STRING_8 -- Tag of last violated assertion clause -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class was_error: BOOLEAN -- Indicates that there was an error during the last operation zero_option: BOOLEAN -- No options provided -- (from SOCKET_RESOURCES) feature -- Status setting catch (code: INTEGER_32) -- Make sure that any exception of code code will be -- caught. This is the default. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class die (code: INTEGER_32) -- Terminate execution with exit status code, -- without triggering an exception. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS False instance_free: class ignore (code: INTEGER_32) -- Make sure that any exception of code code will be -- ignored. This is not the default. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class message_on_failure -- Print an exception history table -- in case of failure. -- This is the default. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class no_message_on_failure -- Do not print an exception history table -- in case of failure. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class raise (name: detachable READABLE_STRING_GENERAL) -- Raise a developer exception of name `name`. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class raise_retrieval_exception (name: detachable READABLE_STRING_GENERAL) -- Raise a retrieval exception of name `name`. -- (from EXCEPTIONS) ensure -- from EXCEPTIONS instance_free: class feature -- Element change basic_store (object: ANY) -- Produce an external representation of the -- entire object structure reachable from object. -- Retrievable within current system only. require -- from IO_MEDIUM object_not_void: object /= Void extendible: extendible support_storable: support_storable general_store (object: ANY) -- Produce an external representation of the -- entire object structure reachable from object. -- Retrievable from other systems for same platform -- (machine architecture). require -- from IO_MEDIUM object_not_void: object /= Void extendible: extendible support_storable: support_storable independent_store (object: ANY) -- Produce an external representation of the -- entire object structure reachable from object. -- Retrievable from other systems for the same or other -- platform (machine architecture). require -- from IO_MEDIUM object_not_void: object /= Void extendible: extendible support_storable: support_storable feature -- Removal dispose -- Ensure this medium is closed when garbage collected. -- (from IO_MEDIUM) feature -- Duplication copy (other: SOCKET) -- Update current object using fields of object attached -- to other, so as to yield equal objects. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other frozen deep_copy (other: SOCKET) -- Effect equivalent to that of: -- `copy` (other . `deep_twin`) -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY deep_equal: deep_equal (Current, other) frozen deep_twin: SOCKET -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: SOCKET) -- Copy every field of other onto corresponding field -- of current object. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_standard_equal: standard_is_equal (other) frozen standard_twin: SOCKET -- New object field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) frozen twin: SOCKET -- New object equal to Current -- `twin` calls `copy`; to change copying/twinning semantics, redefine `copy`. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Miscellaneous name: STRING_8 -- Socket name feature -- Basic operations frozen default: detachable SOCKET -- Default value of object's type -- (from ANY) frozen default_pointer: POINTER -- Default value of type POINTER -- (Avoid the need to write p.`default` for -- some p of type POINTER.) -- (from ANY) ensure -- from ANY instance_free: class default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) ensure -- from ANY instance_free: class feature -- Obsolete lastchar: CHARACTER_8 -- Last character read by `read_character` -- (from IO_MEDIUM) lastdouble: REAL_64 -- Last double read by `read_double` -- (from IO_MEDIUM) lastint: INTEGER_32 -- Last integer read by `read_integer` -- (from IO_MEDIUM) lastreal: REAL_32 -- Last real read by `read_real` -- (from IO_MEDIUM) laststring: like last_string -- Last string read -- (from IO_MEDIUM) feature -- Access bits size boolean_bits: INTEGER_32 -- Number of bits in a value of type BOOLEAN -- (from PLATFORM) ensure -- from PLATFORM instance_free: class Character_32_bits: INTEGER_32 = 32 -- Number of bits in a value of type CHARACTER_32 -- (from PLATFORM) Character_8_bits: INTEGER_32 = 8 -- Number of bits in a value of type CHARACTER_8 -- (from PLATFORM) Integer_16_bits: INTEGER_32 = 16 -- Number of bits in a value of type INTEGER_16 -- (from PLATFORM) Integer_32_bits: INTEGER_32 = 32 -- Number of bits in a value of type INTEGER_32 -- (from PLATFORM) Integer_64_bits: INTEGER_32 = 64 -- Number of bits in a value of type INTEGER_64 -- (from PLATFORM) Integer_8_bits: INTEGER_32 = 8 -- Number of bits in a value of type INTEGER_8 -- (from PLATFORM) Natural_16_bits: INTEGER_32 = 16 -- Number of bits in a value of type NATURAL_16 -- (from PLATFORM) Natural_32_bits: INTEGER_32 = 32 -- Number of bits in a value of type NATURAL_32 -- (from PLATFORM) Natural_64_bits: INTEGER_32 = 64 -- Number of bits in a value of type NATURAL_64 -- (from PLATFORM) Natural_8_bits: INTEGER_32 = 8 -- Number of bits in a value of type NATURAL_8 -- (from PLATFORM) pointer_bits: INTEGER_32 -- Number of bits in a value of type POINTER -- (from PLATFORM) ensure -- from PLATFORM instance_free: class Real_32_bits: INTEGER_32 = 32 -- Number of bits in a value of type REAL_32 -- (from PLATFORM) Real_64_bits: INTEGER_32 = 64 -- Number of bits in a value of type REAL_64 -- (from PLATFORM) feature -- Access bytes size boolean_bytes: INTEGER_32 -- Number of bytes in a value of type BOOLEAN -- (from PLATFORM) ensure -- from PLATFORM instance_free: class Character_32_bytes: INTEGER_32 = 4 -- Number of bytes in a value of type CHARACTER_32 -- (from PLATFORM) Character_8_bytes: INTEGER_32 = 1 -- Number of bytes in a value of type CHARACTER_8 -- (from PLATFORM) Integer_16_bytes: INTEGER_32 = 2 -- Number of bytes in a value of type INTEGER_16 -- (from PLATFORM) Integer_32_bytes: INTEGER_32 = 4 -- Number of bytes in a value of type INTEGER_32 -- (from PLATFORM) Integer_64_bytes: INTEGER_32 = 8 -- Number of bytes in a value of type INTEGER_64 -- (from PLATFORM) Integer_8_bytes: INTEGER_32 = 1 -- Number of bytes in a value of type INTEGER_8 -- (from PLATFORM) Natural_16_bytes: INTEGER_32 = 2 -- Number of bytes in a value of type NATURAL_16 -- (from PLATFORM) Natural_32_bytes: INTEGER_32 = 4 -- Number of bytes in a value of type NATURAL_32 -- (from PLATFORM) Natural_64_bytes: INTEGER_32 = 8 -- Number of bytes in a value of type NATURAL_64 -- (from PLATFORM) Natural_8_bytes: INTEGER_32 = 1 -- Number of bytes in a value of type NATURAL_8 -- (from PLATFORM) pointer_bytes: INTEGER_32 -- Number of bytes in a value of type POINTER -- (from PLATFORM) ensure -- from PLATFORM instance_free: class Real_32_bytes: INTEGER_32 = 4 -- Number of bytes in a value of type REAL_32 -- (from PLATFORM) Real_64_bytes: INTEGER_32 = 8 -- Number of bytes in a value of type REAL_64 -- (from PLATFORM) feature -- Basic commands address: detachable like address_type -- Local address of socket address_type: SOCKET_ADDRESS -- Type of `address` and `peer_address` require not_callable: False ensure for_typing_only: False bind -- Bind socket to local address in `address`. require socket_exists: exists valid_local_address: address /= Void cleanup -- Cleanup socket. close -- Close socket for all context. require -- from IO_MEDIUM medium_is_open: not is_closed close_socket -- Close socket for current context. require socket_exists: exists ensure is_closed: is_closed connect -- Connect socket to peer address. require socket_exists: exists valid_peer_address: peer_address /= Void descriptor_available: BOOLEAN -- Is descriptor available? family: INTEGER_32 -- Socket family eg. af_inet, af_unix is_closed: BOOLEAN -- Is socket closed? make_socket -- Create socket descriptor. require valid_family: family >= 0 valid_type: type >= 0 valid_protocol: protocol >= 0 peer_address: detachable like address -- Peer address of socket protocol: INTEGER_32 -- Protocol of the socket. default 0 -- means for the system to chose the default -- protocol for the family chosen. eg. udp, tcp. set_address (addr: like address) -- Set local address to addr. require add_non_void: addr /= Void same_type: is_valid_family (addr) ensure address_set: address = addr set_peer_address (addr: separate like address) -- Set peer address to addr. require address_exists: addr /= Void address_valid: is_valid_peer_address (addr) ensure separate_address_object_equal: not attached {like address} addr implies peer_address ~ addr nonseparate_address_reference_equal: attached {like address} addr implies peer_address = addr type: INTEGER_32 -- Type of socket. eg stream, datagram feature -- Externals: flags for send, sendto recv and recvfrom socket calls c_msgdontroute: INTEGER_32 -- Do not route message -- (from SOCKET_RESOURCES) c_oobmsg: INTEGER_32 -- Out of bound message -- (from SOCKET_RESOURCES) c_peekmsg: INTEGER_32 -- Peek message -- (from SOCKET_RESOURCES) feature -- Input last_boolean: BOOLEAN -- Last boolean read by read_boolean read (size: INTEGER_32): detachable PACKET -- Read a packet of data of maximum size size. require socket_exists: exists opened_for_read: is_open_read read_boolean -- Read a new boolean. -- Maker result available in `last_boolean`. -- Was declared in {SOCKET} as synonym of `readbool`. read_character -- Read a new character. -- Make result available in `last_character`. -- Was declared in {SOCKET} as synonym of `readchar`. require -- from IO_MEDIUM is_readable: readable read_double -- Read a new double. -- Make result available in `last_double`. -- Was declared in {SOCKET} as synonym of `readdouble` and `read_real_64`. require -- from IO_MEDIUM is_readable: readable read_integer -- Read a new 32-bit integer. -- Make result available in `last_integer`. -- Was declared in {SOCKET} as synonym of `readint` and `read_integer_32`. require -- from IO_MEDIUM is_readable: readable read_integer_16 -- Read a new 16-bit integer. -- Make result available in `last_integer_16`. require -- from IO_MEDIUM is_readable: readable read_integer_32 -- Read a new 32-bit integer. -- Make result available in `last_integer`. -- Was declared in {SOCKET} as synonym of `read_integer` and `readint`. require -- from IO_MEDIUM is_readable: readable read_integer_64 -- Read a new 64-bit integer. -- Make result available in `last_integer_64`. require -- from IO_MEDIUM is_readable: readable read_integer_8 -- Read a new 8-bit integer. -- Make result available in `last_integer_8`. require -- from IO_MEDIUM is_readable: readable read_line -- Read a line of characters (ended by a new_line). -- Was declared in {SOCKET} as synonym of `readline`. require -- from IO_MEDIUM is_readable: readable ensure -- from IO_MEDIUM last_string_not_void: last_string /= Void read_line_thread_aware -- Read characters until a new line or -- end of medium. -- Make result available in `last_string`. -- Functionally identical to `read_line` but -- won't prevent garbage collection from occurring -- while blocked waiting for data, though data must -- be copied an extra time. -- (from IO_MEDIUM) require -- from IO_MEDIUM is_readable: readable ensure -- from IO_MEDIUM last_string_not_void: last_string /= Void read_line_until (n: INTEGER_32) -- Read a line of at most n characters (ended by a new_line). -- If new line not read after n characters, set an error. require is_readable: readable ensure last_string_not_void: last_string /= Void read_natural -- Read a new 32-bit natural. -- Make result available in `last_natural`. -- Was declared in {SOCKET} as synonym of `read_natural_32`. require -- from IO_MEDIUM is_readable: readable read_natural_16 -- Read a new 16-bit natural. -- Make result available in `last_natural_16`. require -- from IO_MEDIUM is_readable: readable read_natural_32 -- Read a new 32-bit natural. -- Make result available in `last_natural`. -- Was declared in {SOCKET} as synonym of `read_natural`. require -- from IO_MEDIUM is_readable: readable read_natural_64 -- Read a new 64-bit natural. -- Make result available in `last_natural_64`. require -- from IO_MEDIUM is_readable: readable read_natural_8 -- Read a new 8-bit natural. -- Make result available in `last_natural_8`. require -- from IO_MEDIUM is_readable: readable read_real -- Read a new real. -- Make result available in `last_real`. -- Was declared in {SOCKET} as synonym of `readreal` and `read_real_32`. require -- from IO_MEDIUM is_readable: readable read_real_32 -- Read a new real. -- Make result available in `last_real`. -- Was declared in {SOCKET} as synonym of `read_real` and `readreal`. require -- from IO_MEDIUM is_readable: readable read_real_64 -- Read a new double. -- Make result available in `last_double`. -- Was declared in {SOCKET} as synonym of `read_double` and `readdouble`. require -- from IO_MEDIUM is_readable: readable read_stream (nb_char: INTEGER_32) -- Read a string of at most nb_char characters. -- Make result available in `last_string`. -- Was declared in {SOCKET} as synonym of `readstream`. require -- from IO_MEDIUM is_readable: readable ensure -- from IO_MEDIUM last_string_not_void: last_string /= Void read_stream_thread_aware (nb_char: INTEGER_32) -- Read a string of at most nb_char bound characters -- or until end of medium is encountered. -- Make result available in `last_string`. -- Functionally identical to `read_stream` but -- won't prevent garbage collection from occurring -- while blocked waiting for data, though data must -- be copied an extra time. -- (from IO_MEDIUM) require -- from IO_MEDIUM is_readable: readable ensure -- from IO_MEDIUM last_string_not_void: last_string /= Void read_to_managed_pointer (p: MANAGED_POINTER; start_pos, nb_bytes: INTEGER_32) -- Read at most nb_bytes bound bytes and make result -- available in p at position start_pos. require -- from IO_MEDIUM p_not_void: p /= Void p_large_enough: p.count >= nb_bytes + start_pos nb_bytes_non_negative: nb_bytes >= 0 is_readable: readable ensure -- from IO_MEDIUM bytes_read_non_negative: bytes_read >= 0 bytes_read_not_too_big: bytes_read <= nb_bytes read_to_separate_managed_pointer (a_pointer: separate MANAGED_POINTER; start_pos, a_byte_count: INTEGER_32) -- Read at most a_byte_count bound bytes and make result -- available in a_pointer at position start_pos. require pointer_not_void: a_pointer /= Void large_enough: a_pointer.count >= a_byte_count + start_pos byte_count_non_negative: a_byte_count >= 0 is_readable: readable ensure bytes_read_updated: 0 <= bytes_read and bytes_read <= a_byte_count readbool -- Read a new boolean. -- Maker result available in `last_boolean`. -- Was declared in {SOCKET} as synonym of `read_boolean`. readchar -- Read a new character. -- Make result available in `last_character`. -- Was declared in {SOCKET} as synonym of `read_character`. require -- from IO_MEDIUM is_readable: readable readdouble -- Read a new double. -- Make result available in `last_double`. -- Was declared in {SOCKET} as synonym of `read_double` and `read_real_64`. require -- from IO_MEDIUM is_readable: readable readint -- Read a new 32-bit integer. -- Make result available in `last_integer`. -- Was declared in {SOCKET} as synonym of `read_integer` and `read_integer_32`. require -- from IO_MEDIUM is_readable: readable readline -- Read a line of characters (ended by a new_line). -- Was declared in {SOCKET} as synonym of `read_line`. require -- from IO_MEDIUM is_readable: readable ensure -- from IO_MEDIUM last_string_not_void: last_string /= Void readreal -- Read a new real. -- Make result available in `last_real`. -- Was declared in {SOCKET} as synonym of `read_real` and `read_real_32`. require -- from IO_MEDIUM is_readable: readable readstream (nb_char: INTEGER_32) -- Read a string of at most nb_char characters. -- Make result available in `last_string`. -- Was declared in {SOCKET} as synonym of `read_stream`. require -- from IO_MEDIUM is_readable: readable ensure -- from IO_MEDIUM last_string_not_void: last_string /= Void receive (size, flags: INTEGER_32): detachable PACKET -- Receive a packet of maximum size size. require socket_exists: exists opened_for_read: is_open_read feature -- Output exists: BOOLEAN -- Does socket exist? require -- from IO_MEDIUM True ensure then definition: Result implies descriptor_available extendible: BOOLEAN -- May new items be added? Io: STD_FILES -- Handle to standard file setup -- (from ANY) ensure -- from ANY instance_free: class io_not_void: Result /= Void is_executable: BOOLEAN -- Is socket an executable? require -- from IO_MEDIUM handle_exists: exists is_open_read: BOOLEAN -- Is socket opened for reading? is_open_write: BOOLEAN -- Is socket opened for writing? is_readable: BOOLEAN -- Is there currently any data available on socket? require -- from IO_MEDIUM handle_exists: exists is_writable: BOOLEAN -- Is socket a writable medium? require -- from IO_MEDIUM handle_exists: exists new_line -- Write a "new_line" character to socket. -- Was declared in {SOCKET} as synonym of `put_new_line`. require -- from IO_MEDIUM extendible: extendible out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY out_not_void: Result /= Void print (o: detachable ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) ensure -- from ANY instance_free: class put_boolean (b: BOOLEAN) -- Write boolean b to socket. -- Was declared in {SOCKET} as synonym of `putbool`. require -- from IO_MEDIUM extendible: extendible put_character (c: CHARACTER_8) -- Write character c to socket. -- Was declared in {SOCKET} as synonym of `putchar`. require -- from IO_MEDIUM extendible: extendible put_double (d: REAL_64) -- Write double d to socket. -- Was declared in {SOCKET} as synonym of `putdouble` and `put_real_64`. require -- from IO_MEDIUM extendible: extendible put_integer (i: INTEGER_32) -- Write integer i to socket. -- Was declared in {SOCKET} as synonym of `putint` and `put_integer_32`. require -- from IO_MEDIUM extendible: extendible put_integer_16 (i: INTEGER_16) -- Write integer i to socket. require -- from IO_MEDIUM extendible: extendible put_integer_32 (i: INTEGER_32) -- Write integer i to socket. -- Was declared in {SOCKET} as synonym of `put_integer` and `putint`. require -- from IO_MEDIUM extendible: extendible put_integer_64 (i: INTEGER_64) -- Write integer i to socket. require -- from IO_MEDIUM extendible: extendible put_integer_8 (i: INTEGER_8) -- Write integer i to socket. require -- from IO_MEDIUM extendible: extendible put_managed_pointer (p: MANAGED_POINTER; start_pos, nb_bytes: INTEGER_32) -- Put data of length nb_bytes pointed by start_pos index in p at -- current position. require -- from IO_MEDIUM p_not_void: p /= Void p_large_enough: p.count >= nb_bytes + start_pos nb_bytes_non_negative: nb_bytes >= 0 extendible: extendible put_natural (i: NATURAL_32) -- Write natural i to socket. -- Was declared in {SOCKET} as synonym of `put_natural_32`. require -- from IO_MEDIUM extendible: extendible put_natural_16 (i: NATURAL_16) -- Write natural i to socket. require -- from IO_MEDIUM extendible: extendible put_natural_32 (i: NATURAL_32) -- Write natural i to socket. -- Was declared in {SOCKET} as synonym of `put_natural`. require -- from IO_MEDIUM extendible: extendible put_natural_64 (i: NATURAL_64) -- Write natural i to socket. require -- from IO_MEDIUM extendible: extendible put_natural_8 (i: NATURAL_8) -- Write natural i to socket. require -- from IO_MEDIUM extendible: extendible put_new_line -- Write a "new_line" character to socket. -- Was declared in {SOCKET} as synonym of `new_line`. require -- from IO_MEDIUM extendible: extendible put_real (r: REAL_32) -- Write real r to socket. -- Was declared in {SOCKET} as synonym of `putreal` and `put_real_32`. require -- from IO_MEDIUM extendible: extendible put_real_32 (r: REAL_32) -- Write real r to socket. -- Was declared in {SOCKET} as synonym of `put_real` and `putreal`. require -- from IO_MEDIUM extendible: extendible put_real_64 (d: REAL_64) -- Write double d to socket. -- Was declared in {SOCKET} as synonym of `put_double` and `putdouble`. require -- from IO_MEDIUM extendible: extendible put_separate_managed_pointer (a_pointer: separate MANAGED_POINTER; start_pos, a_byte_count: INTEGER_32) -- Put data of length a_byte_count pointed by start_pos index in a_pointer at -- current position. require pointer_not_void: a_pointer /= Void large_enough: a_pointer.count >= a_byte_count + start_pos byte_count_non_negative: a_byte_count >= 0 extendible: extendible put_string (s: READABLE_STRING_8) -- Write string s to socket. -- Was declared in {SOCKET} as synonym of `putstring`. require -- from IO_MEDIUM extendible: extendible non_void: s /= Void putbool (b: BOOLEAN) -- Write boolean b to socket. -- Was declared in {SOCKET} as synonym of `put_boolean`. require -- from IO_MEDIUM extendible: extendible putchar (c: CHARACTER_8) -- Write character c to socket. -- Was declared in {SOCKET} as synonym of `put_character`. require -- from IO_MEDIUM extendible: extendible putdouble (d: REAL_64) -- Write double d to socket. -- Was declared in {SOCKET} as synonym of `put_double` and `put_real_64`. require -- from IO_MEDIUM extendible: extendible putint (i: INTEGER_32) -- Write integer i to socket. -- Was declared in {SOCKET} as synonym of `put_integer` and `put_integer_32`. require -- from IO_MEDIUM extendible: extendible putreal (r: REAL_32) -- Write real r to socket. -- Was declared in {SOCKET} as synonym of `put_real` and `put_real_32`. require -- from IO_MEDIUM extendible: extendible putstring (s: READABLE_STRING_8) -- Write string s to socket. -- Was declared in {SOCKET} as synonym of `put_string`. require -- from IO_MEDIUM extendible: extendible non_void: s /= Void readable: BOOLEAN -- Is there a current item that may be read? require -- from IO_MEDIUM handle_exists: exists send (a_packet: PACKET; flags: INTEGER_32) -- Send a packet a_packet of data to socket. require socket_exists: exists opened_for_write: is_open_write valid_packet: a_packet /= Void frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY tagged_out_not_void: Result /= Void write (a_packet: PACKET) -- Write packet a_packet to socket. require a_packet_not_void: a_packet /= Void socket_exists: exists feature -- Platform is_64_bits: BOOLEAN -- Is the current process runing in 64-bit mode -- (from PLATFORM) ensure -- from PLATFORM instance_free: class is_dotnet: BOOLEAN -- Are we targetting .NET? -- (from PLATFORM) ensure -- from PLATFORM instance_free: class Is_little_endian: BOOLEAN -- Is current platform a little endian one? -- (from PLATFORM) ensure -- from PLATFORM instance_free: class is_mac: BOOLEAN -- Are we running on Mac OS? -- (from PLATFORM) ensure -- from PLATFORM instance_free: class is_scoop_capable: BOOLEAN -- Is current platform capable of SCOOP? -- (from PLATFORM) ensure -- from PLATFORM instance_free: class is_thread_capable: BOOLEAN -- Is current platform capable of multi-threading? -- (from PLATFORM) ensure -- from PLATFORM instance_free: class is_unix: BOOLEAN -- Are we running on a Unix like platform? -- (from PLATFORM) ensure -- from PLATFORM instance_free: class is_vms: BOOLEAN -- Are we running on VMS? -- (from PLATFORM) ensure -- from PLATFORM instance_free: class is_vxworks: BOOLEAN -- Are we running on VxWorks? -- (from PLATFORM) ensure -- from PLATFORM instance_free: class is_windows: BOOLEAN -- Are we running on Windows platform? -- (from PLATFORM) ensure -- from PLATFORM instance_free: class Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void feature -- socket options debug_enabled: BOOLEAN -- Is socket system debugging enabled? require socket_exists: exists disable_debug -- Disable socket system debugging. require socket_exists: exists do_not_route -- Set socket to non-routing. require socket_exists: exists enable_debug -- Enable socket system debugging. require socket_exists: exists group_id: INTEGER_32 -- Group id of socket require socket_exists: exists group_set: is_group_id is_blocking: BOOLEAN -- Is the socket blocking? is_group_id: BOOLEAN -- Is the owner id the socket group id? require socket_exists: exists is_process_id: BOOLEAN -- Is the owner id the socket process id? require socket_exists: exists is_socket_stream: BOOLEAN -- Is the socket a stream? require socket_exists: exists process_id: INTEGER_32 -- Process id of socket require socket_exists: exists process_set: is_process_id receive_buf_size: INTEGER_32 -- Size of receive buffer. require socket_exists: exists route -- Set socket to routing. require socket_exists: exists route_enabled: BOOLEAN -- Is routing enabled? require socket_exists: exists send_buf_size: INTEGER_32 -- Size of send buffer. require socket_exists: exists set_blocking -- Set socket to blocking mode. require socket_exists: exists ensure is_blocking set_non_blocking -- Set socket to non-blocking mode. require socket_exists: exists ensure not is_blocking set_owner (own: INTEGER_32) -- Negative value sets group process id. -- positive value sets process id. require socket_exists: exists valid_owner: own /= 0 and own /= -1 ensure set_id: own < -1 implies own = group_id or else own > 0 implies own = process_id set_receive_buf_size (s: INTEGER_32) -- Set receive buffer size. require socket_exists: exists ensure size_set: s = receive_buf_size set_send_buf_size (s: INTEGER_32) -- Set the send buffer to size s. require socket_exists: exists ensure size_set: s = send_buf_size invariant -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) note copyright: "Copyright (c) 1984-2020, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class SOCKET
Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:

-- Generated by Eiffel Studio --
For more details: eiffel.org