Project

Profile

Help

Feature #94

Add support for the SSL protocol

Added by Vincent Le Goff about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
High
Category:
MUD client
Sprint/Milestone:
% Done:

100%

Company:
-
Contact person:
-
Additional contact persons:
-

Description

So far, CocoMUD only supports the plain Telnet protocol. Handling the SSL protocol would be interesting and quite easy with twisted. Tests could be performed with Evennia.


Checklist

History

#1 Updated by Vincent Le Goff about 2 years ago

  • Status changed from Open to In Progress

Using Twisted will require far more than changing the client structure, at least, in design. An alternative would be to place all the networking infrastructure in a separate thread (this thread will actually run the Twisted reactor). It might be better to keep Twisted in the main loop and place the user interface in another thread, however. Both strategies will have to be tested. The latter would allow to create simple differed tasks, supporting client timers, for instance.

#2 Updated by Vincent Le Goff about 2 years ago

There is some useful information on how to have twisted and wxPython's event loops peacefully co-exist. This post describes several methods to do it. It seems there's no real caution to be considered, as long as communication between threads is carefully planned, which is already the case. Additionally, Twisted already has an interesting documentation describing how to handle threads. I would be in favor of having Twisted's reaction running in the main thread, and wxPython in another one.

The client hierarchy, meanwhile, could be written as a simple Twisted protocol and a single factory instantiated before the application starts. Different methods of the reactor can be used to connect a protocol through simple TCP or SSL. However, it remains interesting to take into account the fact that, in the future, some other factories might be created, to support SSH connection, for instance.

#3 Updated by Vincent Le Goff about 2 years ago

The networking protocol is now going to be handled by twisted.conch.telnet.Telnet which provides support for common Telnet options and a convenient handling of messages. Seeing as the network and UI will run in separate threads, however, it is necessary to use an adequate system to communicate between them.

#4 Updated by Vincent Le Goff about 2 years ago

  • Checklist item Re-structure the client's hierarchy to allow other protocols. set to Done

The new structure supported Twisted was added in the commit e9cc2ac8f9e8b1975bfc30b968bcd9c324cf780b. The wxreactor was eventually used to handle both Twisted and wxPython's event loop. The networking strategy had to be modified, but is now closer to a true asynchronous application.

#5 Updated by Vincent Le Goff about 2 years ago

  • Checklist item Create the SSL wrapper redirecting to the client's main display. set to Done

#6 Updated by Vincent Le Goff about 2 years ago

  • Checklist item Add a choice of protocol when configuring worlds. set to Done
  • Status changed from In Progress to Closed
  • % Done changed from 60 to 100

Please register to edit this issue

Also available in: Atom PDF Tracking page