TServerSocket Connect

Posted on 2009-02-24
Last Modified: 2013-11-23

    How to force TServerSocket  connect to a specific Client we know its IP Address and Port Number and currently not connected to any server?

  I have a Client Server Applications and I want to make the server application searchs for the Client applications and when find them, try to connect to them.

is it possible?
Question by:i7mad
    LVL 19

    Expert Comment

    Clients connect to a server, not the other way around. What do you mean exactly?

    Author Comment


     Thanks for your fast response.

      I want my  Application to let user of server knows who is Online.

    Online means : Client Applications running and not connected to any server.

    ALL Clients has the same Port namber, and the server as well.
    LVL 19

    Expert Comment

    This is not possible, you can not make a connection to a client...
    LVL 17

    Accepted Solution

    I think you are getting confused with the terminology
    socket clients connect to socket servers.
    but there is no reason why your client "application" can't have a socket server on it...
    then your server "application" can try to connect to all of the client "applications"
    note; your server "application" would need to create a new client Socket for each connection

    Author Closing Comment

    That was what I did exactly, Thanks.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
    Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
    The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

    794 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

    16 Experts available now in Live!

    Get 1:1 Help Now