* * *

Author Topic: VTX Client/Server  (Read 373 times)


  • New member
  • *
  • Posts: 6
VTX Client/Server
« on: July 16, 2017, 05:01:51 am »
Thought I'd share my current monkeying arounding here. ;)

This project is my attempt to render BBS style ANSI text-based console-like communications to the web browser.

The server (written in FPC) runs on the 'sysop's machine awaiting a HTTP request. The web server in the server program delivers a small HTML page, CSS, and Javascript client.

The client then connects to the server's websocket listener (on a different port than the HTTP listener) and then sends and recieves UTF-8 text with embedded ANSI escape sequences.

Upon the 'user' connecting to the server via web sockets, the server spawns an external process and the server bridges StdIn / StdOut streams of the application and the 'users' client.
(StdErr messages from the external process are logged on the server console).

Once the 'user' drops websocket connection, the external process ('node') is terminated, or if the the external process ('node') terminates, the websocket connection is dropped.

I've tested it so far in all modern Mozilla and Chromium browsers and it works great there. I, for the life of me, am unable to the client to work in Microsoft browsers. (I've never had very good luck getting javascript to run properly in IE or Edge).

Included in the project is the Free Pascal http/ws server, the javascript client, and some sample node software (also in Free Pascal).

GitHub : https://github.com/codewar65/VTX_ClientServer
Facebook: https://www.facebook.com/vtxemu/
Website: http://www.vtxemu.com/ (a bit not-up-to-date).

Feel free to poke around and comment.


  • New member
  • *
  • Posts: 6
Re: VTX Client/Server
« Reply #1 on: July 22, 2017, 07:16:51 pm »
I had to remove all Telnet client capabilities from the projects. I can not reliably get the Synapse api to work within a stream based telnet client. Dropped connections are undetectable. And trying to detect them throws an exception as the TTCPBlockSocket object had been freed someplace (getting the $FEEEFEEE magic number in debugger). I've even tried to encapsulate code in 'try .. except's but they explode none the less.



Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus