deferred class SOCKET_SERVER
Summary
A socket server waits for connections to happen on some given access point. It then defers treatment to handlers (see the when_connect feature).
Please use ACCESS.server to create a SOCKET_SERVER.
Direct parents
Insert list: SOCKET_HANDLER, SOCKET_PLUG_IN
Known children
Inherit list: IPV4_SOCKET_SERVER, LOCAL_SOCKET_SERVER
Overview
Features
{ANY}
{EVENTS_SET, SOCKET}
  • fd: INTEGER_32
    The file descriptor of the socket; it is used to wait for some connection.
{SOCKET_INPUT_OUTPUT_STREAM}
{}
{ANY}
{}
{}
Plugin
{}
Name resolution -- see LOCALHOST
{}
Macros for setting options
{}
can_connect: BOOLEAN
writable attribute
{ANY}
True if some client can connect to the server.
error: STRING
writable attribute
{ANY}
shutdown
effective procedure
{ANY}
Wait for the connections to finish, then stop the server.
halt
effective procedure
{ANY}
Force all the connected sockets to disconnect, then shutdown
new_stream (read_sync: BOOLEAN): SOCKET_INPUT_OUTPUT_STREAM
effective function
{ANY}
writable attribute
The file descriptor of the socket; it is used to wait for some connection.
bind (a_sync: BOOLEAN): SOCKET
deferred function
Create a socket for the stream to connect upon (used by the stream at creation)
unbind (socket: SOCKET)
effective procedure
Close the socket and unbind it
has_socket (socket: SOCKET): BOOLEAN
deferred function
socket_disconnected (socket: SOCKET)
deferred procedure
kill_connections
deferred procedure
{}
event_connection: EVENT_DESCRIPTOR
effective function
{ANY}
connection_occurred: NETWORK_CONNECTION_OCCURRED
writable attribute
{}
last_error: STRING
effective function
{}
last_error_number: INTEGER_32
effective function
{}
net_tcp (ip_a: INTEGER_32, ip_b: INTEGER_32, ip_c: INTEGER_32, ip_d: INTEGER_32, a_port: INTEGER_32, a_sync: BOOLEAN): INTEGER_32
{}
net_udp (ip_a: INTEGER_32, ip_b: INTEGER_32, ip_c: INTEGER_32, ip_d: INTEGER_32, a_port: INTEGER_32, a_sync: BOOLEAN): INTEGER_32
{}
net_local (a_port: INTEGER_32, a_sync: BOOLEAN): INTEGER_32
{}
net_select (a_fd: INTEGER_32, a_timeout: REAL_64): INTEGER_32
{}
net_read (a_fd: INTEGER_32, a_count: INTEGER_32, a_buffer: POINTER, sync: BOOLEAN): INTEGER_32
{}
net_write (a_fd: INTEGER_32, a_count: INTEGER_32, a_buffer: NATIVE_ARRAY[CHARACTER]): INTEGER_32
{}
net_accept (a_fd: INTEGER_32, a_val: NATIVE_ARRAY[INTEGER_32], a_sync: BOOLEAN)
{}
net_disconnect (a_fd: INTEGER_32)
{}
net_shutdown (a_fd: INTEGER_32)
{}
net_last_error: POINTER
{}
net_last_error_number: INTEGER_32
{}
net_last_error_try_again: BOOLEAN
{}
net_hostname (a_hostname: POINTER): INTEGER_32
{}
net_tcp_server (port: INTEGER_32, a_sync: BOOLEAN): INTEGER_32
{}
net_udp_server (port: INTEGER_32, a_sync: BOOLEAN): INTEGER_32
{}
net_local_server (port: INTEGER_32, a_sync: BOOLEAN): INTEGER_32
{}
net_bind_server (socket: INTEGER_32, port: INTEGER_32, sockfamily: INTEGER_32): INTEGER_32
{}
net_set_int_option (fd: INTEGER_32, level: INTEGER_32, optname: INTEGER_32, opt_val: INTEGER_32): INTEGER_32
{}
net_tcp_socket (sync: BOOLEAN): INTEGER_32
{}
net_udp_socket (sync: BOOLEAN): INTEGER_32
{}
net_local_socket (sync: BOOLEAN): INTEGER_32
{}
net_gethostname: POINTER
{}
net_sethostname (hn: POINTER, size: INTEGER_32)
{}
net_getdomainname: POINTER
{}
net_setdomainname (dn: POINTER, size: INTEGER_32)
{}
sol_socket: INTEGER_32
{}
so_reuse_addr: INTEGER_32
{}
af_inet: INTEGER_32
{}