aboutsummaryrefslogblamecommitdiffstats
path: root/pages/develop/api/efl/net/server.txt
blob: fbbe2789c6c8d9b2bf4c04cce619713eadf75ba4 (plain) (tree)
1
2
3
4
5
6
7
8
9
                         





                                        
                                                                                                                                                                           
 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  







                                                                             

















                                                                                                                                         
                     
 
 
 
    

                   
                                                      





                                                              
                                                                                                 






                                                              
                                                                                                             






                                                                   
                                                                                           






                                                                                                    
                                                                                                 






                                                                     
                                                                                        





                                                                          


                  
                                                               





                                                       
                                                                         



                                                  
                                                                                                                                              
   
                                                     





                                                              
                                                         



                                  
                                                                                                                                               
   
~~Title: Efl.Net.Server~~
====== Efl.Net.Server (interface) ======

===== Description =====

%%The basic server interface.%%

%%It will start serving and accepting clients once %%[[:develop:api:efl:net:server:method:serve|Efl.Net.Server.serve]]%% is called and the "serving" event is dispatched.%%

%%When new clients are accepted, then "client,add" event is dispatched with a child object implementing %%[[:develop:api:efl:net:socket|Efl.Net.Socket]]%% interface. These implement the standard %%[[:develop:api:efl:io:reader|Efl.Io.Reader]]%%, %%[[:develop:api:efl:io:writer|Efl.Io.Writer]]%% and %%[[:develop:api:efl:io:closer|Efl.Io.Closer]]%% interfaces, thus can be used with utilities such as %%[[:develop:api:efl:io:copier|Efl.Io.Copier]]%%.%%

//Since 1.19//

{{page>:develop:api-include:efl:net:server:description&nouser&nolink&nodate}}

===== Inheritance =====


++++ Inheritance graph |

<graphviz>
digraph hierarchy {
    bgcolor = "transparent"
    size = "6"
    rankdir = "TB"

    node [shape = "box"]
    edge [color = "gray35"]

    efl_net_server [fillcolor = "dodgerblue4", label = "Efl.Net.Server", color = "cornflowerblue", fontcolor = "white", style = "filled"]

}
</graphviz>

++++

++++ Full hierarchy |



++++
===== Members =====

**[[:develop:api:efl:net:server:method:serve|serve]]**
<code c>
Eina_Error efl_net_server_serve(Eo *obj, const char *address);
</code>

%%Starts serving requests.%%\\ 
\\ 
**[[:develop:api:efl:net:server:property:address|address]]** //**(get, set)**// ''protected set''
<code c>
const char *efl_net_server_address_get(const Eo *obj);
void efl_net_server_address_set(Eo *obj, const char *address);
</code>

%%The address the server is bound to.%%\\ 
\\ 
**[[:develop:api:efl:net:server:property:clients_count|clients_count]]** //**(get, set)**// ''protected set''
<code c>
unsigned int efl_net_server_clients_count_get(const Eo *obj);
void efl_net_server_clients_count_set(Eo *obj, unsigned int count);
</code>

%%Number of concurrent clients accepted by this server.%%\\ 
\\ 
**[[:develop:api:efl:net:server:property:clients_limit|clients_limit]]** //**(get, set)**//
<code c>
void efl_net_server_clients_limit_get(const Eo *obj, unsigned int *limit, Eina_Bool *reject_excess);
void efl_net_server_clients_limit_set(Eo *obj, unsigned int limit, Eina_Bool reject_excess);
</code>

%%Number of maximum concurrent clients allowed by this server.%%\\ 
\\ 
**[[:develop:api:efl:net:server:property:serving|serving]]** //**(get, set)**// ''protected set''
<code c>
Eina_Bool efl_net_server_serving_get(const Eo *obj);
void efl_net_server_serving_set(Eo *obj, Eina_Bool serving);
</code>

%%Returns whenever the server is ready to accept clients or not.%%\\ 
\\ 
**[[:develop:api:efl:net:server:method:client_announce|client_announce]]** ''protected''
<code c>
Eina_Bool efl_net_server_client_announce(Eo *obj, Efl_Net_Socket *client);
</code>

%%Implementions should call this method to announce new clients.%%\\ 
\\ 

===== Events =====

**[[:develop:api:efl:net:server:event:client_add|client,add]]**
<code c>
EFL_NET_SERVER_EVENT_CLIENT_ADD(Efl_Net_Socket *, @hot)
</code>

%%A new client socket was created.%%\\ 
\\ 
**[[:develop:api:efl:net:server:event:client_rejected|client,rejected]]**
<code c>
EFL_NET_SERVER_EVENT_CLIENT_REJECTED(const char *)
</code>

%%Notifies a client was rejected due excess, see %%[[:develop:api:efl:net:server:property:clients_limit|Efl.Net.Server.clients_limit]]%%.%%\\ 
\\ 
**[[:develop:api:efl:net:server:event:error|error]]**
<code c>
EFL_NET_SERVER_EVENT_ERROR(Eina_Error)
</code>

%%Some error happened and the server needs to be stopped.%%\\ 
\\ 
**[[:develop:api:efl:net:server:event:serving|serving]]**
<code c>
EFL_NET_SERVER_EVENT_SERVING(void)
</code>

%%Notifies the server is ready to accept clients. See property %%[[:develop:api:efl:net:server:property:serving|Efl.Net.Server.serving]]%%%%\\ 
\\