0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 06:13:52 +01:00

Implement listen_tcp method in remaining workers

Signed-off-by: Silke <silke@slxh.eu>
This commit is contained in:
Silke 2017-12-17 14:15:30 +01:00
parent 26cd3f5690
commit df0f602796
10 changed files with 155 additions and 192 deletions

View file

@ -79,16 +79,15 @@ class AppserviceServer(HomeServer):
root_resource = create_resource_tree(resources, Resource())
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
bind_addresses,
port,
SynapseSite(
"synapse.access.http.%s" % (site_tag,),
site_tag,
listener_config,
root_resource,
),
interface=address
)
)
logger.info("Synapse appservice now listening on port %d", port)
@ -98,17 +97,14 @@ class AppserviceServer(HomeServer):
if listener["type"] == "http":
self._listen_http(listener)
elif listener["type"] == "manhole":
bind_addresses = listener["bind_addresses"]
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
listener["bind_addresses"],
listener["port"],
manhole(
username="matrix",
password="rabbithole",
globals={"hs": self},
),
interface=address
)
)
else:
logger.warn("Unrecognized listener type: %s", listener["type"])

View file

@ -103,16 +103,15 @@ class ClientReaderServer(HomeServer):
root_resource = create_resource_tree(resources, Resource())
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
bind_addresses,
port,
SynapseSite(
"synapse.access.http.%s" % (site_tag,),
site_tag,
listener_config,
root_resource,
),
interface=address
)
)
logger.info("Synapse client reader now listening on port %d", port)
@ -122,18 +121,16 @@ class ClientReaderServer(HomeServer):
if listener["type"] == "http":
self._listen_http(listener)
elif listener["type"] == "manhole":
bind_addresses = listener["bind_addresses"]
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
listener["bind_addresses"],
listener["port"],
manhole(
username="matrix",
password="rabbithole",
globals={"hs": self},
),
interface=address
)
)
else:
logger.warn("Unrecognized listener type: %s", listener["type"])

View file

@ -92,16 +92,15 @@ class FederationReaderServer(HomeServer):
root_resource = create_resource_tree(resources, Resource())
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
bind_addresses,
port,
SynapseSite(
"synapse.access.http.%s" % (site_tag,),
site_tag,
listener_config,
root_resource,
),
interface=address
)
)
logger.info("Synapse federation reader now listening on port %d", port)
@ -111,17 +110,14 @@ class FederationReaderServer(HomeServer):
if listener["type"] == "http":
self._listen_http(listener)
elif listener["type"] == "manhole":
bind_addresses = listener["bind_addresses"]
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
listener["bind_addresses"],
listener["port"],
manhole(
username="matrix",
password="rabbithole",
globals={"hs": self},
),
interface=address
)
)
else:
logger.warn("Unrecognized listener type: %s", listener["type"])

View file

@ -106,16 +106,15 @@ class FederationSenderServer(HomeServer):
root_resource = create_resource_tree(resources, Resource())
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
bind_addresses,
port,
SynapseSite(
"synapse.access.http.%s" % (site_tag,),
site_tag,
listener_config,
root_resource,
),
interface=address
)
)
logger.info("Synapse federation_sender now listening on port %d", port)
@ -125,17 +124,14 @@ class FederationSenderServer(HomeServer):
if listener["type"] == "http":
self._listen_http(listener)
elif listener["type"] == "manhole":
bind_addresses = listener["bind_addresses"]
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
listener["bind_addresses"],
listener["port"],
manhole(
username="matrix",
password="rabbithole",
globals={"hs": self},
),
interface=address
)
)
else:
logger.warn("Unrecognized listener type: %s", listener["type"])

View file

@ -157,16 +157,15 @@ class FrontendProxyServer(HomeServer):
root_resource = create_resource_tree(resources, Resource())
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
bind_addresses,
port,
SynapseSite(
"synapse.access.http.%s" % (site_tag,),
site_tag,
listener_config,
root_resource,
),
interface=address
)
)
logger.info("Synapse client reader now listening on port %d", port)
@ -176,17 +175,14 @@ class FrontendProxyServer(HomeServer):
if listener["type"] == "http":
self._listen_http(listener)
elif listener["type"] == "manhole":
bind_addresses = listener["bind_addresses"]
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
listener["bind_addresses"],
listener["port"],
manhole(
username="matrix",
password="rabbithole",
globals={"hs": self},
),
interface=address
)
)
else:
logger.warn("Unrecognized listener type: %s", listener["type"])

View file

@ -228,10 +228,8 @@ class SynapseHomeServer(HomeServer):
if listener["type"] == "http":
self._listener_http(config, listener)
elif listener["type"] == "manhole":
bind_addresses = listener["bind_addresses"]
listen_tcp(
bind_addresses,
listener["bind_addresses"],
listener["port"],
manhole(
username="matrix",

View file

@ -99,16 +99,15 @@ class MediaRepositoryServer(HomeServer):
root_resource = create_resource_tree(resources, Resource())
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
bind_addresses,
port,
SynapseSite(
"synapse.access.http.%s" % (site_tag,),
site_tag,
listener_config,
root_resource,
),
interface=address
)
)
logger.info("Synapse media repository now listening on port %d", port)
@ -118,17 +117,14 @@ class MediaRepositoryServer(HomeServer):
if listener["type"] == "http":
self._listen_http(listener)
elif listener["type"] == "manhole":
bind_addresses = listener["bind_addresses"]
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
listener["bind_addresses"],
listener["port"],
manhole(
username="matrix",
password="rabbithole",
globals={"hs": self},
),
interface=address
)
)
else:
logger.warn("Unrecognized listener type: %s", listener["type"])

View file

@ -114,16 +114,15 @@ class PusherServer(HomeServer):
root_resource = create_resource_tree(resources, Resource())
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
bind_addresses,
port,
SynapseSite(
"synapse.access.http.%s" % (site_tag,),
site_tag,
listener_config,
root_resource,
),
interface=address
)
)
logger.info("Synapse pusher now listening on port %d", port)
@ -133,17 +132,14 @@ class PusherServer(HomeServer):
if listener["type"] == "http":
self._listen_http(listener)
elif listener["type"] == "manhole":
bind_addresses = listener["bind_addresses"]
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
listener["bind_addresses"],
listener["port"],
manhole(
username="matrix",
password="rabbithole",
globals={"hs": self},
),
interface=address
)
)
else:
logger.warn("Unrecognized listener type: %s", listener["type"])

View file

@ -288,16 +288,15 @@ class SynchrotronServer(HomeServer):
root_resource = create_resource_tree(resources, Resource())
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
bind_addresses,
port,
SynapseSite(
"synapse.access.http.%s" % (site_tag,),
site_tag,
listener_config,
root_resource,
),
interface=address
)
)
logger.info("Synapse synchrotron now listening on port %d", port)
@ -307,17 +306,14 @@ class SynchrotronServer(HomeServer):
if listener["type"] == "http":
self._listen_http(listener)
elif listener["type"] == "manhole":
bind_addresses = listener["bind_addresses"]
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
listener["bind_addresses"],
listener["port"],
manhole(
username="matrix",
password="rabbithole",
globals={"hs": self},
),
interface=address
)
)
else:
logger.warn("Unrecognized listener type: %s", listener["type"])

View file

@ -131,16 +131,15 @@ class UserDirectoryServer(HomeServer):
root_resource = create_resource_tree(resources, Resource())
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
bind_addresses,
port,
SynapseSite(
"synapse.access.http.%s" % (site_tag,),
site_tag,
listener_config,
root_resource,
),
interface=address
)
)
logger.info("Synapse user_dir now listening on port %d", port)
@ -150,17 +149,14 @@ class UserDirectoryServer(HomeServer):
if listener["type"] == "http":
self._listen_http(listener)
elif listener["type"] == "manhole":
bind_addresses = listener["bind_addresses"]
for address in bind_addresses:
reactor.listenTCP(
_base.listen_tcp(
listener["bind_addresses"],
listener["port"],
manhole(
username="matrix",
password="rabbithole",
globals={"hs": self},
),
interface=address
)
)
else:
logger.warn("Unrecognized listener type: %s", listener["type"])