Nir Soffer has posted comments on this change.

Change subject: json-rpc: Protocol detection
......................................................................


Patch Set 15:

(2 comments)

http://gerrit.ovirt.org/#/c/26300/15/vdsm/protocolDetector.py
File vdsm/protocolDetector.py:

Line 26: 
Line 27: from sslutils import SSLServerSocket
Line 28: 
Line 29: 
Line 30: class ProtocolDetector:
> Good point I will change the name.
Or Acceptor - this class accept connections and pass the accepted connection to 
other servers.
Line 31:     log = logging.getLogger("protocolDetector.ProtocolDetector")
Line 32: 
Line 33:     READ_ONLY = (select.POLLIN | select.POLLPRI | select.POLLHUP
Line 34:                  | select.POLLERR)


Line 72:                             self.log.warn("Unrecognized protocol from 
%s",
Line 73:                                           socket_address)
Line 74:                             continue
Line 75: 
Line 76:                         for handler in self.handlers.values():
> At this stage non of the handlers overlaps with detection. In other words t
I think we do care about order. For example, on of the options may be the 
preferred, so you want to put it first. It does not matter for the 
implementation if you keep a list or a dict for 2-3 detectors.
Line 77:                             if handler.detect(data):
Line 78:                                 handler.handleSocket(client_socket,
Line 79:                                                      socket_address)
Line 80:                                 break


-- 
To view, visit http://gerrit.ovirt.org/26300
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75
Gerrit-PatchSet: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to