GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
SOCKET
+
Point of view
All features
ANY
RECYCLING_POOL
SOCKET_HANDLER
All features
deferred class SOCKET
Summary
top
A low-level socket. Should not be used directly, but only via a
SOCKET_INPUT_OUTPUT_STREAM
.
Direct parents
Insert list:
DISPOSABLE
,
RECYCLABLE
Known children
Inherit list:
SOCKET_IMPL
Overview
top
Features
{
SOCKET_HANDLER
}
default_buffer_size
:
INTEGER_32
set_sync
(a_sync:
BOOLEAN
)
set blocking mode for reading, True is blocking, False nonblocking
sync
:
BOOLEAN
the blocking mode for reading from the socket, True is blocking, False nonblocking
is_connected
:
BOOLEAN
is_remote_connected
:
BOOLEAN
error
:
STRING
read
last_read
:
STRING
write
(data:
STRING
)
disconnect
clear
fd
:
INTEGER_32
when_disconnected
(a_listener:
PROCEDURE
[
TUPLE 1
[SOCKET]])
socket listeners
{}
disconnected_listeners
:
FAST_ARRAY
[
PROCEDURE
[
TUPLE 1
[SOCKET]]]
fire_disconnected
{
RECYCLING_POOL
}
recycle
Do whatever needs to be done to free resources or recycle other objects when recycling this one
really low level
{}
dispose
Action to be executed just before garbage collection reclaims an object.
default_buffer_size
:
INTEGER_32
is 8192
constant attribute
{
SOCKET_HANDLER
}
top
set_sync
(a_sync:
BOOLEAN
)
deferred procedure
{
SOCKET_HANDLER
}
top
set blocking mode for reading, True is blocking, False nonblocking
ensure
sync
= a_sync
sync
:
BOOLEAN
deferred function
{
SOCKET_HANDLER
}
top
the blocking mode for reading from the socket, True is blocking, False nonblocking
is_connected
:
BOOLEAN
deferred function
{
SOCKET_HANDLER
}
top
ensure
Result implies
is_remote_connected
is_remote_connected
:
BOOLEAN
deferred function
{
SOCKET_HANDLER
}
top
error
:
STRING
deferred function
{
SOCKET_HANDLER
}
top
read
deferred procedure
{
SOCKET_HANDLER
}
top
require
is_connected
last_read
:
STRING
deferred function
{
SOCKET_HANDLER
}
top
require
is_connected
write
(data:
STRING
)
deferred procedure
{
SOCKET_HANDLER
}
top
require
is_connected
data /= Void
disconnect
deferred procedure
{
SOCKET_HANDLER
}
top
require
is_connected
ensure
not
is_connected
not
is_remote_connected
clear
deferred procedure
{
SOCKET_HANDLER
}
top
require
not
is_connected
fd
:
INTEGER_32
deferred function
{
SOCKET_HANDLER
}
top
when_disconnected
(a_listener:
PROCEDURE
[
TUPLE 1
[SOCKET]])
effective procedure
{
SOCKET_HANDLER
}
top
require
a_listener /= Void
disconnected_listeners
:
FAST_ARRAY
[
PROCEDURE
[
TUPLE 1
[SOCKET]]]
writable attribute
{}
top
fire_disconnected
effective procedure
{}
top
recycle
effective procedure
{
RECYCLING_POOL
}
top
Do whatever needs to be done to free resources or recycle other objects when recycling this one
dispose
effective procedure
{}
top
Action to be executed just before garbage collection reclaims an object.
require
should_not_rely_on_gc:
not
is_connected