| | |
- Executive
- idlelib.rpc.RPCHandler(SocketServer.BaseRequestHandler, idlelib.rpc.SocketIO)
-
- MyHandler
- idlelib.rpc.RPCServer(SocketServer.TCPServer)
-
- MyRPCServer
class MyHandler(idlelib.rpc.RPCHandler) |
| | |
- Method resolution order:
- MyHandler
- idlelib.rpc.RPCHandler
- SocketServer.BaseRequestHandler
- idlelib.rpc.SocketIO
Methods defined here:
- EOFhook(self)
- Override SocketIO method - terminate wait on callback and exit thread
- decode_interrupthook(self)
- interrupt awakened thread
- exithook(self)
- override SocketIO method - wait for MainThread to shut us down
- handle(self)
- Override base method
Methods inherited from idlelib.rpc.RPCHandler:
- __init__(self, sock, addr, svr)
- get_remote_proxy(self, oid)
Data and other attributes inherited from idlelib.rpc.RPCHandler:
- debugging = False
- location = '#S'
Methods inherited from SocketServer.BaseRequestHandler:
- finish(self)
- setup(self)
Methods inherited from idlelib.rpc.SocketIO:
- asynccall(self, oid, methodname, args, kwargs)
- asyncqueue(self, oid, methodname, args, kwargs)
- asyncreturn(self, seq)
- close(self)
- debug(self, *args)
- decoderesponse(self, response)
- getresponse(self, myseq, wait)
- handle_EOF(self)
- action taken upon link being closed by peer
- ioready(self, wait)
- localcall(self, seq, request)
- mainloop(self)
- Listen on socket until I/O not ready or EOF
pollresponse() will loop looking for seq number None, which
never comes, and exit on EOFError.
- newseq(self)
- pollmessage(self, wait)
- pollpacket(self, wait)
- pollresponse(self, myseq, wait)
- Handle messages received on the socket.
Some messages received may be asynchronous 'call' or 'queue' requests,
and some may be responses for other threads.
'call' requests are passed to localcall() with the expectation of
immediate execution, during which time the socket is not serviced.
'queue' requests are used for tasks (which may block or hang) to be
processed in a different thread. These requests are fed into
request_queue by localcall(). Responses to queued requests are
taken from response_queue and sent across the link with the associated
sequence numbers. Messages in the queues are (sequence_number,
request/response) tuples and code using this module removing messages
from the request_queue is responsible for returning the correct
sequence number in the response_queue.
pollresponse() will loop until a response message with the myseq
sequence number is received, and will save other responses in
self.responses and notify the owning thread.
- putmessage(self, message)
- register(self, oid, object)
- remotecall(self, oid, methodname, args, kwargs)
- remotequeue(self, oid, methodname, args, kwargs)
- unregister(self, oid)
Data and other attributes inherited from idlelib.rpc.SocketIO:
- buffer = ''
- bufneed = 4
- bufstate = 0
- nextseq = 0
|
class MyRPCServer(idlelib.rpc.RPCServer) |
| | |
- Method resolution order:
- MyRPCServer
- idlelib.rpc.RPCServer
- SocketServer.TCPServer
- SocketServer.BaseServer
Methods defined here:
- handle_error(self, request, client_address)
- Override RPCServer method for IDLE
Interrupt the MainThread and exit server if link is dropped.
Methods inherited from idlelib.rpc.RPCServer:
- __init__(self, addr, handlerclass=None)
- get_request(self)
- Override TCPServer method, return already connected socket
- server_activate(self)
- Override TCPServer method, connect() instead of listen()
Due to the reversed connection, self.server_address is actually the
address of the Idle Client to which we are connecting.
- server_bind(self)
- Override TCPServer method, no bind() phase for connecting entity
Methods inherited from SocketServer.TCPServer:
- close_request(self, request)
- Called to clean up an individual request.
- fileno(self)
- Return socket file number.
Interface required by select().
- server_close(self)
- Called to clean-up the server.
May be overridden.
Data and other attributes inherited from SocketServer.TCPServer:
- address_family = 2
- allow_reuse_address = False
- request_queue_size = 5
- socket_type = 1
Methods inherited from SocketServer.BaseServer:
- finish_request(self, request, client_address)
- Finish one request by instantiating RequestHandlerClass.
- handle_request(self)
- Handle one request, possibly blocking.
- process_request(self, request, client_address)
- Call finish_request.
Overridden by ForkingMixIn and ThreadingMixIn.
- serve_forever(self)
- Handle one request at a time until doomsday.
- verify_request(self, request, client_address)
- Verify the request. May be overridden.
Return True if we should proceed with this request.
| |