mirror of
https://github.com/gnh1201/caterpillar.git
synced 2024-11-26 07:21:46 +00:00
Update base.py
This commit is contained in:
parent
75aec1d8bf
commit
5567325620
13
base.py
13
base.py
|
@ -198,6 +198,19 @@ class Extension:
|
|||
return extension
|
||||
return None
|
||||
|
||||
@classmethod
|
||||
def test_connector(cls, data):
|
||||
def test(prelude, data):
|
||||
return data.find(prelude) == 0
|
||||
|
||||
for extension in cls.extensions:
|
||||
if (
|
||||
extension.type == "connector"
|
||||
and test(extension.prelude, data)
|
||||
):
|
||||
return extension
|
||||
return None
|
||||
|
||||
@classmethod
|
||||
def send_accept(cls, conn, method, success=True):
|
||||
if "tcp" in cls.protocols:
|
||||
|
|
Loading…
Reference in New Issue
Block a user