Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

TMS-FNC-WebSocket-Multiple-Connections

TMS FNC WebSocket Multiple Connections Example

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Delphi TMS FNC WebSocket Server Application Multiple Connection Handling Example

This Delphi VCL application demonstrates a WebSocket server using the <code>TMSFNCWebSocketServer</code> component from the TMS FNC libraries. The server can handle multiple client connections, broadcast messages, and send targeted messages to specific Clients.

Screenshot of the Delphi WebSocket Server Application

Features

<ul> <li>Client Management: Tracks connected clients and updates the list view.</li> <li>Broadcast Messaging: Sends messages to all connected clients.</li> <li>Targeted Messaging: Sends messages to a specific client selected from the list view.</li> </ul>

Components

<ul> <li><code>TTMSFNCWebSocketServer:</code> Manages WebSocket server communications.</li> <li><code>TListView (scListView1, scListView2):</code> Displays connected clients and additional information. (Cilent Nickname)</li> <li><code>TStatusBar (scStatusBar1):</code> Shows server status and connected client count.</li> <li><code>TPopupMenu (PopupMenu1):</code> Provides options for broadcasting messages or sending targeted messages.</li> </ul>

Usage

<ol> <li>Start the Application: Run the Delphi project to start the WebSocket server.</li> <li>Connect Clients: Clients can connect to the server using the specified port (3434).</li> <li>Broadcast Message: Use the context menu option <code>S1</code> to send a message to all connected clients.</li> <li>Send to Selected Client: Use the context menu option <code>S2</code> to send a message to a specific client selected from the <code>TListView</code>.</li> <li>View Client Information: Click on a client in <code>scListView1</code> to view and update their information in <code>scListView2</code>.</li> </ol>

Dependencies

<ul> <li><code>Delphi RAD Studio:</code> Required for compiling and running the project.</li> <li><code>TMS FNC Core:</code> Includes the <code>MAIN CLASSES</code> required for all TMS FNC Libraries to function.</li> <li><code>TMS FNC Core Location:</code> Find the FNC CORE library in this zip file: FNC Core.7z </li> <li><code>TMS FNC Websocket Library:</code> Includes the <code>TTMSFNCWebSocketServer</code> component for WebSocket functionality.</li> <li><code>TMS FNC Websocket Library Location:</code> Find the websocket components in this zip file: FNC Websocket Library.7z </li> </ul>

License

This project is provided "as is", without warranty of any kind.

Built with Delphi RAD Studio with ❤️ by BitmasterXor.