Solved

Simple TServerSocket question

Posted on 2001-06-15
1
155 Views
Last Modified: 2010-04-06
I'm wondering how I would go about sending text to all connected clients from a TServerSocket. Normally I use Socket.SendText to send to one I just recieved text from, but that only sends to a specific sock, I wanna send to ALL connected sockets... Any takers?
0
Comment
Question by:Psylord
1 Comment
 
LVL 5

Accepted Solution

by:
TheNeil earned 25 total points
ID: 6194394
Try iterating through all of your connections:

VAR
  iCount : LONGINT;
begin
  FOR iCount := 0 TO (ServerSocket1.Socket.ActiveConnections - 1)
  DO
    ServerSocket1.Socket.Connections[iCount].SendText(sMsg);
END;

The Neil =:)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
calling procedure inside activexForm from secondform 1 232
Delphi Form ownership 4 73
FMX and jaudiotracker playing memory stream 29 67
DBGrid or StringGrid ? 6 72
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now