+
Point of view
All features
class MULTIPLEX_CONNECTION
Summary
Handle one connection to the MULTIPLEX_SERVER.
Each connection is very simple: all the data is sent back (it's an "echo" thing), except when one of the three commands below is issued. A command is a single word written alone on its line. The three commands are:
bye simply closes the current connection.
shutdown will stop the server as soon as all the open connections are closed. The server does not
          accept any new connection.
halt closes all the open connections and shut the server down.
Direct parents
Inherit list: CONNECTION
Class invariant
Overview
Creation features
{MULTIPLEX_SERVER}
Features
{LOOP_ITEM}
{SERVER}
{}
Loop implementation
{LOOP_ITEM}
Implementation
{}
{JOB, LOOP_ITEM}
{LOOP_ITEM}
Maximum:
{}
Minimum:
{}
Bits:
{}
continue
effective procedure
Continue to do the job.
The work to do has to be small work and non blocking, it will continue on next call.
require
  • not done
effective procedure
Called by the server when the connection is initiated.
The stream is the socket into which the connection is plugged.
require
  • a_io.is_connected
ensure
  • ios = a_io
make (a_server: MULTIPLEX_SERVER)
effective procedure
{}
handle_disconnect (a_io: SOCKET_INPUT_OUTPUT_STREAM)
effective procedure
{}
require
writable attribute
{}
writable attribute
{}
counter: COUNTER
once function
{}
prepare (a_events: EVENTS_SET)
effective procedure
Launched before starting the to manage requests.
Indicate in a_events the kind of request to manage.
require
  • a_events /= Void
  • not a_events.queryable
  • not done
is_ready (a_events: EVENTS_SET): BOOLEAN
effective function
True if Current is ready to manage requests using a_events to detect it.
require
  • a_events /= Void
  • a_events.queryable
  • not done
done: BOOLEAN
effective function
Current has finished managing requests and answers.
restart
effective procedure
Restart the connection.
Require by Job. Should not be used.
require
  • done
ensure
  • not done
writable attribute
{}
Used to read (request) and write (answer)
priority: INTEGER_32
writable attribute
never change a job's priority after inserting it in loop_item.
Priority should only be set at creation time.
infix "<" (other: JOB): BOOLEAN
effective function
Maximum_character_code: INTEGER_16
{}
Largest supported code for CHARACTER values.
ensure
  • meaningful: Result >= 127
Maximum_integer_8: INTEGER_8
is 127
constant attribute
{}
Largest supported value of type INTEGER_8.
Maximum_integer_16: INTEGER_16
is 32767
constant attribute
{}
Largest supported value of type INTEGER_16.
Maximum_integer: INTEGER_32
is 2147483647
constant attribute
{}
Largest supported value of type INTEGER/INTEGER_32.
Maximum_integer_32: INTEGER_32
is 2147483647
constant attribute
{}
Largest supported value of type INTEGER/INTEGER_32.
Maximum_integer_64: INTEGER_64
is 9223372036854775807
constant attribute
{}
Largest supported value of type INTEGER_64.
Maximum_real_32: REAL_32
is {REAL_32 3.4028234663852885981170418348451692544e+38}
constant attribute
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL_32.
Maximum_real: REAL_64
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: 1.79769313486231570....e+308
Maximum_real_64: REAL_64
{}
Largest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: 1.79769313486231570....e+308
Maximum_real_80: REAL_EXTENDED
{}
Largest supported value of type REAL_80.
ensure
Minimum_character_code: INTEGER_16
{}
Smallest supported code for CHARACTER values.
ensure
  • meaningful: Result <= 0
Minimum_integer_8: INTEGER_8
is -128
constant attribute
{}
Smallest supported value of type INTEGER_8.
Minimum_integer_16: INTEGER_16
is -32768
constant attribute
{}
Smallest supported value of type INTEGER_16.
Minimum_integer: INTEGER_32
is -2147483648
constant attribute
{}
Smallest supported value of type INTEGER/INTEGER_32.
Minimum_integer_32: INTEGER_32
is -2147483648
constant attribute
{}
Smallest supported value of type INTEGER/INTEGER_32.
Minimum_integer_64: INTEGER_64
is -9223372036854775808
constant attribute
{}
Smallest supported value of type INTEGER_64.
Minimum_real_32: REAL_32
is {REAL_32 -3.40282346638528859811704183484516925440e+38}
constant attribute
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL_32.
Minimum_real: REAL_64
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: -1.79769313486231570....e+308
Minimum_real_64: REAL_64
{}
Smallest non-special (no NaNs nor infinity) supported value of type REAL.
Just to give an idea of this value: -1.79769313486231570....e+308
Minimum_real_80: REAL_64
{}
Smallest supported value of type REAL_80.
ensure
  • meaningful: Result <= 0.0
Boolean_bits: INTEGER_32
{}
Number of bits in a value of type BOOLEAN.
ensure
  • meaningful: Result >= 1
Character_bits: INTEGER_32
{}
Number of bits in a value of type CHARACTER.
ensure
Integer_bits: INTEGER_32
{}
Number of bits in a value of type INTEGER.
ensure
  • integer_definition: Result = 32
Real_bits: INTEGER_32
is 64
constant attribute
{}
Number of bits in a value of type REAL.
Pointer_bits: INTEGER_32
{}
Number of bits in a value of type POINTER.