indexing
description: "Connexion oriented socket."
legal: "See notice at end of class."
status: "See notice at end of class."
date: "$Date: 2006-01-22 18:25:44 -0800 (Sun, 22 Jan 2006) $"
revision: "$Revision: 56675 $"
class interface
STREAM_SOCKET
create {STREAM_SOCKET}
create_from_descriptor (fd: INTEGER_32)
`fd'
SOCKET
ensure SOCKET
family_valid: family = address.family
opened_all: is_open_write and is_open_read
feature
create_from_descriptor (fd: INTEGER_32)
`fd'
SOCKET
ensure SOCKET
family_valid: family = address.family
opened_all: is_open_write and is_open_read
feature
generating_type: STRING_8
ANY
generator: STRING_8
ANY
retrieved: ANY
Retrieve_exception
SOCKET
require IO_MEDIUM
is_readable: readable
support_storable: support_storable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
support_storable: support_storable
ensure IO_MEDIUM
result_exists: Result /= Void
feature
frozen deep_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
shallow_implies_deep: standard_equal (some, other) implies Result
both_or_none_void: (some = Void) implies (Result = (other = Void))
same_type: (Result and (some /= Void)) implies some.same_type (other)
symmetric: Result implies deep_equal (other, some)
frozen equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other))
is_equal (other: like Current): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
symmetric: Result implies other.is_equal (Current)
consistent: standard_is_equal (other) implies Result
frozen standard_equal (some: ANY; other: like arg #1): BOOLEAN
`some'`other'
ANY
ensure ANY
definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.standard_is_equal (other))
frozen standard_is_equal (other: like Current): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
same_type: Result implies same_type (other)
symmetric: Result implies other.standard_is_equal (Current)
feature
address_in_use: BOOLEAN
SOCKET_RESOURCES
address_not_readable: BOOLEAN
SOCKET_RESOURCES
already_bound: BOOLEAN
SOCKET_RESOURCES
bad_socket_handle: BOOLEAN
SOCKET_RESOURCES
bytes_read: INTEGER_32
read_to_managed_pointer
IO_MEDIUM
conforms_to (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
connect_in_progress: BOOLEAN
SOCKET_RESOURCES
connection_refused: BOOLEAN
SOCKET_RESOURCES
dtable_full: BOOLEAN
SOCKET_RESOURCES
error: STRING_8
SOCKET_RESOURCES
error_number: INTEGER_32
SOCKET_RESOURCES
expired_socket: BOOLEAN
SOCKET_RESOURCES
invalid_address: BOOLEAN
SOCKET_RESOURCES
invalid_socket_handle: BOOLEAN
SOCKET_RESOURCES
is_plain_text: BOOLEAN
IO_MEDIUM
is_valid_peer_address (addr: SOCKET_ADDRESS): BOOLEAN
`addr'
SOCKET
require SOCKET
address_exists: addr /= Void
last_character: CHARACTER_8
read_character
IO_MEDIUM
last_double: REAL_64
read_double
IO_MEDIUM
last_integer: INTEGER_32
read_integer
IO_MEDIUM
last_integer_16: INTEGER_16
read_integer_16
IO_MEDIUM
last_integer_32: INTEGER_32
last_integer
IO_MEDIUM
last_integer_64: INTEGER_64
read_integer_64
IO_MEDIUM
last_integer_8: INTEGER_8
read_integer_8
IO_MEDIUM
last_natural: NATURAL_32
read_natural
IO_MEDIUM
last_natural_16: NATURAL_16
read_natural_16
IO_MEDIUM
last_natural_32: NATURAL_32
last_natural
IO_MEDIUM
last_natural_64: NATURAL_64
read_natural_64
IO_MEDIUM
last_natural_8: NATURAL_8
read_natural_8
IO_MEDIUM
last_real: REAL_32
read_real
IO_MEDIUM
last_string: STRING_8
IO_MEDIUM
network: BOOLEAN
SOCKET_RESOURCES
no_buffers: BOOLEAN
SOCKET_RESOURCES
no_permission: BOOLEAN
SOCKET_RESOURCES
not_connected: BOOLEAN
SOCKET_RESOURCES
protected_address: BOOLEAN
SOCKET_RESOURCES
protocol_not_supported: BOOLEAN
SOCKET_RESOURCES
same_type (other: ANY): BOOLEAN
`other'
ANY
require ANY
other_not_void: other /= Void
ensure ANY
definition: Result = (conforms_to (other) and other.conforms_to (Current))
socket_family_not_supported: BOOLEAN
SOCKET_RESOURCES
socket_in_use: BOOLEAN
SOCKET_RESOURCES
socket_ok: BOOLEAN
SOCKET_RESOURCES
socket_would_block: BOOLEAN
SOCKET_RESOURCES
support_storable: BOOLEAN is True
zero_option: BOOLEAN
SOCKET_RESOURCES
feature
basic_store (object: ANY)
`object'
SOCKET
require IO_MEDIUM
object_not_void: object /= Void
extendible: extendible
support_storable: support_storable
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
support_storable: support_storable
general_store (object: ANY)
`object'
SOCKET
require IO_MEDIUM
object_not_void: object /= Void
extendible: extendible
support_storable: support_storable
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
support_storable: support_storable
independent_store (object: ANY)
`object'
SOCKET
require IO_MEDIUM
object_not_void: object /= Void
extendible: extendible
support_storable: support_storable
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
support_storable: support_storable
feature
dispose
IO_MEDIUM
feature
copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_equal: is_equal (other)
frozen deep_copy (other: like Current)
copy`other'deep_twin
ANY
require ANY
other_not_void: other /= Void
ensure ANY
deep_equal: deep_equal (Current, other)
frozen deep_twin: like Current
ANY
ensure ANY
deep_equal: deep_equal (Current, Result)
frozen standard_copy (other: like Current)
`other'
ANY
require ANY
other_not_void: other /= Void
type_identity: same_type (other)
ensure ANY
is_standard_equal: standard_is_equal (other)
frozen standard_twin: like Current
`other'
ANY
ensure ANY
standard_twin_not_void: Result /= Void
equal: standard_equal (Result, Current)
frozen twin: like Current
`Current'
twincopycopy
ANY
ensure ANY
twin_not_void: Result /= Void
is_equal: Result.is_equal (Current)
feature
name: STRING_8
SOCKET
require IO_MEDIUM
True
require else SOCKET
socket_exists: exists
feature
frozen default: like Current
ANY
frozen default_pointer: POINTER
`POINTER'
`p'default
`p'`POINTER'
ANY
default_rescue
ANY
frozen do_nothing
ANY
feature
lastchar: CHARACTER_8
read_character
IO_MEDIUM
lastdouble: REAL_64
read_double
IO_MEDIUM
lastint: INTEGER_32
read_integer
IO_MEDIUM
lastreal: REAL_32
read_real
IO_MEDIUM
laststring: STRING_8
IO_MEDIUM
feature
accept
accepted
require
socket_exists: exists
accepted: like Current
listen (queue: INTEGER_32)
`queue'
require
socket_exists: exists
feature
address: SOCKET_ADDRESS
SOCKET
bind
address
SOCKET
require SOCKET
socket_exists: exists
valid_local_address: address /= Void
cleanup
SOCKET
close
SOCKET
require IO_MEDIUM
medium_is_open: not is_closed
require else SOCKET
socket_exists: exists
close_socket
SOCKET
require SOCKET
socket_exists: exists
is_open: is_open_read or is_open_write
ensure SOCKET
is_closed: is_closed
not_is_open: not is_open_read and not is_open_write
connect
SOCKET
require SOCKET
socket_exists: exists
valid_peer_address: peer_address /= Void
descriptor: INTEGER_32
SOCKET
descriptor_available: BOOLEAN
SOCKET
family: INTEGER_32
SOCKET
is_closed: BOOLEAN
SOCKET
make_socket
SOCKET
require SOCKET
valid_family: family >= 0
valid_type: type >= 0
valid_protocol: protocol >= 0
peer_address: like address
SOCKET
protocol: INTEGER_32
`udp'`tcp'
SOCKET
set_address (addr: like address)
`addr'
SOCKET
require SOCKET
same_type: addr.family = family
ensure SOCKET
address_set: address = addr
set_peer_address (addr: like address)
`addr'
SOCKET
require SOCKET
address_exists: addr /= Void
address_valid: is_valid_peer_address (addr)
ensure SOCKET
address_set: peer_address = addr
type: INTEGER_32
SOCKET
feature
c_msgdontroute: INTEGER_32
SOCKET_RESOURCES
c_oobmsg: INTEGER_32
SOCKET_RESOURCES
c_peekmsg: INTEGER_32
SOCKET_RESOURCES
feature
last_boolean: BOOLEAN
SOCKET
read (size: INTEGER_32): PACKET
`size'
SOCKET
require SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_boolean
last_boolean
SOCKETreadbool
SOCKET
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_character
last_character
SOCKETreadchar
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_double
last_double
SOCKETreaddouble
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_integer
last_integer
SOCKETreadintread_integer_32
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_integer_16
last_integer_16
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_integer_32
last_integer
SOCKETread_integerreadint
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_integer_64
last_integer_64
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_integer_8
last_integer_8
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_line
SOCKETreadline
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
ensure IO_MEDIUM
last_string_not_void: last_string /= Void
read_natural
last_natural
SOCKETread_natural_32
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_natural_16
last_natural_16
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_natural_32
last_natural
SOCKETread_natural
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_natural_64
last_natural_64
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_natural_8
last_natural_8
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_real
last_real
SOCKETreadreal
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
read_stream (nb_char: INTEGER_32)
`nb_char'
last_string
SOCKETreadstream
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
ensure IO_MEDIUM
last_string_not_void: last_string /= Void
read_to_managed_pointer (p: MANAGED_POINTER; start_pos, nb_bytes: INTEGER_32)
`nb_bytes'
`p'`start_pos'
SOCKET
require 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
require else SOCKET
p_not_void: p /= Void
p_large_enough: p.count >= nb_bytes + start_pos
nb_bytes_non_negative: nb_bytes >= 0
socket_exists: exists
opened_for_read: is_open_read
ensure IO_MEDIUM
bytes_read_non_negative: bytes_read >= 0
bytes_read_not_too_big: bytes_read <= nb_bytes
readbool
last_boolean
SOCKETread_boolean
SOCKET
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
readchar
last_character
SOCKETread_character
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
readdouble
last_double
SOCKETread_double
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
readint
last_integer
SOCKETread_integerread_integer_32
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
readline
SOCKETread_line
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
ensure IO_MEDIUM
last_string_not_void: last_string /= Void
readreal
last_real
SOCKETread_real
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
readstream (nb_char: INTEGER_32)
`nb_char'
last_string
SOCKETread_stream
SOCKET
require IO_MEDIUM
is_readable: readable
require else SOCKET
socket_exists: exists
opened_for_read: is_open_read
ensure IO_MEDIUM
last_string_not_void: last_string /= Void
receive (size, flags: INTEGER_32): PACKET
`size'
SOCKET
require SOCKET
socket_exists: exists
opened_for_read: is_open_read
feature
exists: BOOLEAN
SOCKET
extendible: BOOLEAN
SOCKET
io: STD_FILES
ANY
is_executable: BOOLEAN
SOCKET
require IO_MEDIUM
handle_exists: exists
is_open_read: BOOLEAN
SOCKET
is_open_write: BOOLEAN
SOCKET
is_readable: BOOLEAN
SOCKET
require IO_MEDIUM
handle_exists: exists
is_writable: BOOLEAN
SOCKET
require IO_MEDIUM
handle_exists: exists
new_line
SOCKETput_new_line
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
out: STRING_8
ANYtagged_out
ANY
print (some: ANY)
`some'
ANY
put_boolean (b: BOOLEAN)
`b'
SOCKETputbool
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_character (c: CHARACTER_8)
`c'
SOCKETputchar
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_double (d: REAL_64)
`d'
SOCKETputdouble
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_integer (i: INTEGER_32)
`i'
SOCKETputintput_integer_32
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_integer_16 (i: INTEGER_16)
`i'
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_integer_32 (i: INTEGER_32)
`i'
SOCKETput_integerputint
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_integer_64 (i: INTEGER_64)
`i'
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_integer_8 (i: INTEGER_8)
`i'
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_managed_pointer (p: MANAGED_POINTER; start_pos, nb_bytes: INTEGER_32)
`nb_bytes'`start_pos'`p'
SOCKET
require 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
require else SOCKET
p_not_void: p /= Void
p_large_enough: p.count >= nb_bytes + start_pos
nb_bytes_non_negative: nb_bytes >= 0
socket_exists: exists
opened_for_write: is_open_write
put_natural (i: NATURAL_32)
`i'
SOCKETput_natural_32
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_natural_16 (i: NATURAL_16)
`i'
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_natural_32 (i: NATURAL_32)
`i'
SOCKETput_natural
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_natural_64 (i: NATURAL_64)
`i'
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_natural_8 (i: NATURAL_8)
`i'
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_new_line
SOCKETnew_line
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_real (r: REAL_32)
`r'
SOCKETputreal
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
put_string (s: STRING_8)
`s'
SOCKETputstring
SOCKET
require IO_MEDIUM
extendible: extendible
non_void: s /= Void
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
putbool (b: BOOLEAN)
`b'
SOCKETput_boolean
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
putchar (c: CHARACTER_8)
`c'
SOCKETput_character
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
putdouble (d: REAL_64)
`d'
SOCKETput_double
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
putint (i: INTEGER_32)
`i'
SOCKETput_integerput_integer_32
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
putreal (r: REAL_32)
`r'
SOCKETput_real
SOCKET
require IO_MEDIUM
extendible: extendible
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
putstring (s: STRING_8)
`s'
SOCKETput_string
SOCKET
require IO_MEDIUM
extendible: extendible
non_void: s /= Void
require else SOCKET
socket_exists: exists
opened_for_write: is_open_write
readable: BOOLEAN
SOCKET
require IO_MEDIUM
handle_exists: exists
send (a_packet: PACKET; flags: INTEGER_32)
`a_packet'
SOCKET
require SOCKET
socket_exists: exists
opened_for_write: is_open_write
valid_packet: a_packet /= Void
frozen tagged_out: STRING_8
ANYout
ANY
write (a_packet: PACKET)
`a_packet'
SOCKET
require SOCKET
socket_exists: exists
opened_for_write: is_open_write
feature
operating_environment: OPERATING_ENVIRONMENT
ANY
feature
debug_enabled: BOOLEAN
SOCKET
require SOCKET
socket_exists: exists
disable_debug
SOCKET
require SOCKET
socket_exists: exists
do_not_route
SOCKET
require SOCKET
socket_exists: exists
enable_debug
SOCKET
require SOCKET
socket_exists: exists
group_id: INTEGER_32
SOCKET
require SOCKET
socket_exists: exists
group_set: is_group_id
is_blocking: BOOLEAN
SOCKET
is_group_id: BOOLEAN
SOCKET
require SOCKET
socket_exists: exists
is_process_id: BOOLEAN
SOCKET
require SOCKET
socket_exists: exists
is_socket_stream: BOOLEAN
SOCKET
require SOCKET
socket_exists: exists
process_id: INTEGER_32
SOCKET
require SOCKET
socket_exists: exists
process_set: is_process_id
receive_buf_size: INTEGER_32
SOCKET
require SOCKET
socket_exists: exists
route
SOCKET
require SOCKET
socket_exists: exists
route_enabled: BOOLEAN
SOCKET
require SOCKET
socket_exists: exists
send_buf_size: INTEGER_32
SOCKET
require SOCKET
socket_exists: exists
set_blocking
SOCKET
require SOCKET
socket_exists: exists
ensure SOCKET
is_blocking
set_non_blocking
SOCKET
require SOCKET
socket_exists: exists
ensure SOCKET
not is_blocking
set_owner (own: INTEGER_32)
SOCKET
require SOCKET
socket_exists: exists
valid_owner: own /= 0 and own /= -1
ensure SOCKET
set_id: own < -1 implies own = group_id or else own > 0 implies own = process_id
set_receive_buf_size (s: INTEGER_32)
SOCKET
require SOCKET
socket_exists: exists
ensure SOCKET
size_set: s = receive_buf_size
set_send_buf_size (s: INTEGER_32)
`s'
SOCKET
require SOCKET
socket_exists: exists
ensure SOCKET
size_set: s = send_buf_size
invariant
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
indexing
copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
source: "[
Eiffel Software
356 Storke Road, Goleta, CA 93117 USA
Telephone 805-685-1006, Fax 805-685-6869
Website http://www.eiffel.com
Customer support http://support.eiffel.com
]"
end STREAM_SOCKET