An Ivy server is responsible for receiving and handling the messages
that other clients send on an Ivy bus to a given agent.
|
|
__init__(self,
agent_name,
ready_msg='',
app_callback=<function void_function at 0x293fd70>,
die_callback=<function void_function at 0x293fd70>,
usesDaemons=False)
Builds a new IvyServer. |
source code
|
|
|
|
|
|
|
|
|
|
handle_new_client(self,
client)
finalisation de la connection avec le client
TODO: peut-etre ajouter un flag (en cours de cnx) sur le client,
qui empecherait l'envoi de msg. |
source code
|
|
|
|
| handle_die_message(self,
msg_id,
from_client=None) |
source code
|
|
|
|
| handle_direct_msg(self,
client,
num_id,
msg) |
source code
|
|
|
|
| handle_regexp_change(self,
client,
event,
id,
regexp) |
source code
|
|
|
|
|
|
|
|
|
|
| bind_regexp_change(self,
on_regexp_change_callback) |
source code
|
|
|
Inherited from SocketServer.ThreadingMixIn:
process_request,
process_request_thread
Inherited from SocketServer.TCPServer:
close_request,
fileno,
get_request,
server_activate,
server_bind,
server_close
Inherited from SocketServer.BaseServer:
finish_request,
handle_error,
handle_request,
handle_timeout,
shutdown,
verify_request
Inherited from SocketServer.BaseServer (private):
_handle_request_noblock
|
|
|
|
|
|
|
|
|
send_msg(self,
message)
Examine the message and choose to send a message to the clients
that subscribed to such a msg |
source code
|
|
|
|
| send_direct_message(self,
agent_name,
num_id,
msg) |
source code
|
|
|
|
|
|
|
handle_msg(self,
client,
idx,
*params)
Simply call the function bound to the subscription id idx with
the supplied parameters. |
source code
|
|
|
|
|
|
|
_get_client(self,
ip,
port,
socket=None,
agent_id=None,
agent_name=None)
Returns the corresponding client, and create a new one if needed. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
_get_fct_for_subscription(self,
idx)
this method is not MT-safe, callers must acquire the
global lock |
source code
|
|
|
|
|
|
|
bind_msg(self,
on_msg_fct,
regexp)
Registers a new subscriptions, by binding a regexp to a function, so
that this function is called whenever a message matching the regexp
is received. |
source code
|
|
|
|
|