GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
TCP_PROTOCOL
+
Point of view
TYPED_INTERNALS
ANY
INTERNALS_HANDLER
TYPED_INTERNALS
RECYCLING_POOL
URL_VALIDITY
URL
All features
deferred class TCP_PROTOCOL
Summary
top
A protocol that handles a TCP stream.
Direct parents
Inherit list:
PROTOCOL
Insert list:
NETWORK_RESOURCE_VALIDITY
Known children
Inherit list:
HTTP_PROTOCOL
Class invariant
top
error /= Void implies not is_connected
Overview
top
Exported features
error
:
STRING
valid_uri
(a_uri:
STRING
):
BOOLEAN
sync
:
BOOLEAN
set_sync
(a_sync:
BOOLEAN
) assign
sync
standard_port
:
INTEGER_32
connect_to
(url:
URL
, read:
BOOLEAN
, write:
BOOLEAN
)
locator
(a_uri:
STRING
):
NETWORK_RESOURCE_LOCATOR
PROTOCOL
is a factory of
RESOURCE_LOCATOR
recycle_locator
(a_locator:
RESOURCE_LOCATOR
)
tcp_connect_to
(ios:
SOCKET_INPUT_OUTPUT_STREAM
, url:
URL
, read:
BOOLEAN
, write:
BOOLEAN
)
locators
:
RECYCLING_POOL
[
NETWORK_RESOURCE_LOCATOR
]
name
:
FIXED_STRING
is_connected
:
BOOLEAN
disconnect
input
:
INPUT_STREAM
output
:
OUTPUT_STREAM
recycle
Do whatever needs to be done to free resources or recycle other objects when recycling this one
dispose
Action to be executed just before garbage collection reclaims an object.
is_relative_uri
(a_uri:
STRING
):
BOOLEAN
is_absolute_uri
(a_uri:
STRING
):
BOOLEAN
True if
a_uri
contains a correctly formatted network URI (i.e. everything except the protocol scheme)
notation
:
UNIX_DIRECTORY_NOTATION
error
:
STRING
writable attribute
top
valid_uri
(a_uri:
STRING
):
BOOLEAN
effective function
top
sync
:
BOOLEAN
writable attribute
top
set_sync
(a_sync:
BOOLEAN
) assign
sync
effective procedure
top
ensure
sync
= a_sync
standard_port
:
INTEGER_32
deferred function
top
connect_to
(url:
URL
, read:
BOOLEAN
, write:
BOOLEAN
)
effective procedure
top
require
url.uri /= Void
not is_connected
read or write
locator
(a_uri:
STRING
):
NETWORK_RESOURCE_LOCATOR
effective function
top
PROTOCOL
is a factory of
RESOURCE_LOCATOR
require
valid_uri(a_uri)
ensure
Result.uri.is_equal(a_uri)
recycle_locator
(a_locator:
RESOURCE_LOCATOR
)
effective procedure
top
require
a_locator /= Void
tcp_connect_to
(ios:
SOCKET_INPUT_OUTPUT_STREAM
, url:
URL
, read:
BOOLEAN
, write:
BOOLEAN
)
deferred procedure
top
require
ios.is_connected
url.uri /= Void
not
is_connected
locators
:
RECYCLING_POOL
[
NETWORK_RESOURCE_LOCATOR
]
once function
top
name
:
FIXED_STRING
deferred function
top
is_connected
:
BOOLEAN
deferred function
top
disconnect
deferred procedure
top
require
is_connected
ensure
not
is_connected
input
:
INPUT_STREAM
deferred function
top
require
is_connected
output
:
OUTPUT_STREAM
deferred function
top
require
is_connected
recycle
effective procedure
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.
is_relative_uri
(a_uri:
STRING
):
BOOLEAN
effective function
top
is_absolute_uri
(a_uri:
STRING
):
BOOLEAN
effective function
top
True if
a_uri
contains a correctly formatted network URI (i.e. everything except the protocol scheme)
require
not a_uri.is_empty
notation
:
UNIX_DIRECTORY_NOTATION
once function
top