Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gnh1201 authored Nov 12, 2024
1 parent 75aec1d commit 5567325
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions base.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,19 @@ def get_connector(cls, connection_type):
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:
Expand Down

0 comments on commit 5567325

Please sign in to comment.