Adding a periodic IMC2 keepalive event. Other IMC2-connected games are now aware of our presence via the keepalive. Woot.

This commit is contained in:
Greg Taylor 2009-04-11 06:59:25 +00:00
parent a7e89c1e54
commit 191f49ff4c
5 changed files with 106 additions and 9 deletions

View file

@ -7,7 +7,6 @@ from django.db import connection
from django.conf import settings
from src.config.models import ConfigValue
from src.session import SessionProtocol
from src.imc2.connection import IMC2ClientFactory
from src import events
from src import logger
from src import session_mgr
@ -146,9 +145,12 @@ for port in settings.GAMEPORTS:
if settings.IMC2_ENABLED:
from src.imc2.connection import IMC2ClientFactory
from src.imc2 import events as imc2_events
imc2_factory = IMC2ClientFactory()
svc = internet.TCPClient(settings.IMC2_SERVER_ADDRESS,
settings.IMC2_SERVER_PORT,
imc2_factory)
svc.setName('IMC2')
svc.setServiceParent(serviceCollection)
svc.setServiceParent(serviceCollection)
imc2_events.add_events()