omgirok
omgirok

Reputation: 175

Establish connection to (another) server on server startup

I currently have a requirement where I'll need my Django server to establish a connection to a 3rd party provider (via sockets) and listen for events. The 3rd party uses TCP to send/receive messages and requires me to do some socket programming to integrate their services.

What I think is supposed to happen:
Django server acts as client socket, 3rd party server will send messages to my Django server and I'll have to appropriately decrypt each message and have respective functions to handle those messages.

Things I'm confused about:

  1. The correctness of this setup / architecture.
  2. Where to place code in Django so that when I run python manage.py runserver my python socket code will execute (the socket.connect($HOSTNAME, $PORT) step)

Upvotes: 0

Views: 150

Answers (0)

Related Questions