DXSock 6th Generation.

Remind people what Brain Patchwork DX, LLC. did/does.
Post Reply
ONiX
Site Admin
Posts: 91
Joined: Tue Nov 18, 2025 1:27 am

DXSock 6th Generation.

Post by ONiX »

During a contract (2005ish) with a client that used DXSock 3 to run his business. I found myself learning to swim in the Deep end of the pool :oops: ~ Linux. My first task was to stabilize their Modem rack. My first "hands on" working with Remote TCP modems. (20+ years later, I am doing this for a living).

Anyway, I dove in head first ~ to developing with Free Pascal. After a couple of weeks of Googling their web site ~ I found the pieces I needed to rebuild DXSock. I was developing on a 21" Mac Book Pro... :D a nice laptop!! So, I launched vim, and started coding ~ making a fairly large
bpdx_logo_background.jpg
bpdx_logo_background.jpg (13.32 KiB) Viewed 18516 times
structure - I began replacing Winsock hooks with the similar commands for UNIX systems. A couple weeks in, I was ready to redesign the DXSOCK SERVER CORE design using Posix Threads.

A month in, I bumped the version to DXSock 5.5 (I had made DXSock 5.0 for my previous employer (CODY Systems)).

5.5 was already processing over 100,000 connections a day. No memory leaks, no failed connections. I bought a Web Server tester (Socrates), and built a new version of my "Winshock Web Server". Socrates was capable of concurrent tests ~ this would help me flesh out any bugs in my thread-pools.

2006, this contract became full-time employment making double what my previous employer could afford to pay me. Being a new year, and a new product (in my eyes)... DXSock became DXSock 6. The smallest build I had ever made.

G.E. Ozz Nixon Jr.
CEO Brain Patchwork DX, LLC.
ONiX
Site Admin
Posts: 91
Joined: Tue Nov 18, 2025 1:27 am

Re: DXSock 6th Generation. (continued)

Post by ONiX »

My next task was to learn OpenSSL 0.9.8 ~ and implement it as simple as possible. I did!

DXSock 6.0 introduced a new procedure, EnableEncryption(...). And when you were finished for solutions that had STARTTLS sessions. You could DisableEncryption(...).

Requirements:
[*] Make the product work with Linux ✓
[*] Remove Borland Dependencies ✓
[*] Simplify the Server ✓
[*][*] Support Running in the Background, or simply running ✓
[*] Remove the 100+ Protocol Implementations ✓
ONiX
Site Admin
Posts: 91
Joined: Tue Nov 18, 2025 1:27 am

Re: DXSock 6th Generation.

Post by ONiX »

February 2026 Build...
  • dxsock6.pas // compatibility wrapper re-exporting core types
  • dxsock6_core.pas // core socket class (TBPDXSock)
  • dxsock6_utils.pas // helpers: DNS/IP, platform compat
  • dxsock6_ssl.pas // dynamic OpenSSL loader + wrappers
  • dxsock6_netutils.pas // network utilities (includes TestTcpConnect)
  • dxsock6_ping.pas // ping (ICMP with TCP fallback)
  • dxsock6_trace.pas // traceroute (simple UDP-based traceroute)
  • dxsock6_beep.pas // cross-platform BeepSimple
  • dxsock6_misc.pas // other small utilities (GetLocalHostNameString)
TestTCPConnect was introduced to remove the long hang when trying to connect to a server that is not there. It takes a 3rd parameter which is the number of milliseconds to auto-timeout.
ONiX
Site Admin
Posts: 91
Joined: Tue Nov 18, 2025 1:27 am

Re: DXSock 6th Generation.

Post by ONiX »

Virtual Pascal 2.1 (OS/2 Support)...
  • Three units form the new 6th Gen foundation; they are defensive and portable. The OpenSSL loader supports many of the common functions needed to perform TLS over an existing socket.
  • TBPDXSSLSock is intentionally simple: EnableEncryption initializes OpenSSL (via TdxOpenSSL), creates a context and SSL object, sets the socket FD and runs a blocking handshake (SSL_connect or SSL_accept). In real servers you may want to support non-blocking handshakes and more parameters (certificates, CA bundles, verification settings). I extended EnableEncryption to accept certificate paths and verification policy.
  • Virtual Pascal / OS/2: The VP conditionals are included at the top of units. Full VP/OS2 support (e.g., using bsesock, os2def, or OS/2 dynamic loader semantics) can be added precisely if you tell the compiler which VP targets you need (VP 2.1 on OS/2? on Linux? on Win32?). I included scaffolding to map VP_WIN32/VP_LINUX/VP_OS2 into these different platform defines; I added specific uses and library name overrides for VP.
Post Reply