Client server application - Delphi tutorial

Поделиться
HTML-код
  • Опубликовано: 30 янв 2025

Комментарии • 44

  • @Stevesteacher
    @Stevesteacher 4 года назад +3

    DUUUDE, this is awesome! Note to others: You have to create the server form before you can connect the client (he shows you how to do the client first, then the server)

    • @BitmasterXor
      @BitmasterXor 3 года назад +1

      Agreed, and also the TclientSocket / TServerSocket components are old and deprecated mainly used for legacy applications today.... but they are still very useful. I do however recommend using newer Socket libraries for more stable and more manageable networked based applications... example (INDY, Synapse, ICS by Overbyte, Clever Internet Suite ect... ect..), and for those of you who wish to keep your file size down I recommend going all out and using raw Winsock API calls... unless of course your programming a Multi device application which will be cross compiled to run on many different Operating Systems.

  • @Aage152
    @Aage152 5 лет назад

    This was "superb". Hope you haven't stopped.

    • @Aage152
      @Aage152 3 года назад

      @Duke Jeremias : Thanks.

  • @DannyC777
    @DannyC777 Год назад

    Reminds me of a "PaperX" the infamous tutorial on how to code a RAT or Trojan

  • @djkjallo1
    @djkjallo1 8 лет назад +1

    Excelente aplicacion... sigan asi saludos.

  • @chuyennguyen9321
    @chuyennguyen9321 4 года назад

    It doesn't work if client runs in a different computer at a different internet connection. Could please test as I did to see if it works and upload the solution. I though Client host or IP is the problem. Thank you !

  • @jeanjamil7891
    @jeanjamil7891 5 лет назад +1

    Hi wy i can' connect with different machines or ip's

  • @joaoaraujo7030
    @joaoaraujo7030 4 года назад

    Hi Thank for the post.. but drive google not contains a source code only exe.. you can post it again?

  • @alisahin4578
    @alisahin4578 5 лет назад

    I am working on a delphide web service.
    I'm new to delphi.
    I couldn't find much on the internet.
    Is there a site you can recommend?

  • @a-tech-information6665
    @a-tech-information6665 2 года назад

    Ty bro nive work

  • @stanislavhristakiev1881
    @stanislavhristakiev1881 7 лет назад

    This code have a problem with connection and Is no worked!
    Error message to connect is socket error 10061
    (In C++ simple apps on Help file RAD Studio "Creating the Web Interface (InterBase Tutorial) " for Client apps have a wrong code - line - ClientDataSet1->RemoteServer = UserSession->DSProviderConnection1; In same tutorial for Delphi code have not problem! )

    • @Delphipracticalschool
      @Delphipracticalschool  7 лет назад

      It seems that you did not configure server properly, as you can see in this video this is working.
      As for error message that you are getting see this on google :
      www.google.com/search?source=hp&ei=N4hvWr3WEcSosgHu2YLgDA&q=socket+error+10061+&oq=socket+error+10061+&gs_l=psy-ab.3..0l10.1544.1544.0.6950.3.2.0.0.0.0.323.323.3-1.2.0..1..0...1c.2.64.psy-ab..1.2.575.6..35i39k1.252.2Q5hGEDE0To

    • @tejaswiniayanampudi9053
      @tejaswiniayanampudi9053 4 года назад

      Same error tried mNy but couldn't resolve what to do?

  • @john_lm0751
    @john_lm0751 6 лет назад

    to bad this doesn't work for delphi xe7. there is no ClientSocket in the components tab. was hopping to try this.

    • @radov3r
      @radov3r 5 лет назад +4

      you have to add it from the file C:\Program Files (x86)\Embarcadero\Studio\XX.0\bin\dclsocketsXXX.bpl

    • @Stevesteacher
      @Stevesteacher 4 года назад +1

      @@radov3r Thanks dude, saved my day :)

  • @futounal-shaikh73
    @futounal-shaikh73 5 лет назад +1

    a lot of thanks ...

  • @ziaddz
    @ziaddz 7 лет назад

    very nice work, but when I try it cont see the message who sent from server to client, only this problem,,can you explain me ?

    • @BitmasterXor
      @BitmasterXor 7 лет назад +1

      well if your using the old Socket components which the guy used in this video .... The "TclientSocket" & "TserverSocket" VCL components the task your trying to accomplish is actually VERY VERY easy do not over think it ok...
      Every client connection that comes in is stored in the TserverSockets "Connections List" which gives you a default way of locking onto the client or "Clients" you are wanting to send commands or messages to from the server itself, However using the serversockets connection list alone is not a good idea.....
      The most simplified way of sending data to a particular client from the server socket is to use the following line of code:
      self.ServerSocket1.Socket.Connections[0].SendText('yo this is some data');
      See the 0 in the line of code that means your sending to the first client that connected to the server so if you wanted to send to the second client you would just take that integer up by one at a time until you are talking to the client that you want to speak to like this:
      self.ServerSocket1.Socket.Connections[0].SendText('yo this is some data');
      self.ServerSocket1.Socket.Connections[1].SendText('yo this is some data');
      self.ServerSocket1.Socket.Connections[2].SendText('yo this is some data');
      Only problem with this is that its PRIMITIVE and NOT a very good way to keep up with active socket connections.... so what we can do to remedy this is to make our very own "Record variable" and store the TcustomWinsocks.data property into our record, this will make things much better for when we wish to communicate to any client in particular....
      So instead of calling them by a Number which makes almost no sense we can start to develop our very own system of Naming each client and then simply looping through the active client socket connections until we find the specific person / client we are wanting to send data to.
      Go here:
      stackoverflow.com/questions/4849596/tserversocket-and-many-tclientsocket
      Look at the answer I provided, I hope it helps you out.
      Also Check here: stackoverflow.com/questions/38835189/delphi-how-to-send-text-to-one-specific-client-connected-to-the-server-socket
      Look at the answer provided by Remy Lebeau.
      Anyways I hope this stuff helps you out good luck with your future projects.

  • @vishalkhulape6845
    @vishalkhulape6845 4 года назад

    does it work with different machine??

  • @علىالعهد
    @علىالعهد 5 лет назад +1

    thank you

  • @YoutubeTH11
    @YoutubeTH11 3 года назад

    Thanks bro

  • @paraescucharrap
    @paraescucharrap 7 лет назад

    This is a TCP Client/Server application of course, right?

  • @mosaadhasan2762
    @mosaadhasan2762 Год назад

    Thanks

  • @ian9923
    @ian9923 7 лет назад

    How did you connect the client to the server ?

    • @Delphipracticalschool
      @Delphipracticalschool  7 лет назад

      If you watched carefully you can see that first you have to activate server.exe giving it port to listen to and click activate.
      Then open client.exe , enter IP address(for example enter loacl IP : 127.0.0.1) and enter the same port as for server.exe and click "connect".
      In server app you should see IP , client host name and information that it is connected.

    • @ian9923
      @ian9923 7 лет назад

      Thx i figured it out

  • @welliganbj
    @welliganbj 8 лет назад

    Muito bom parabéns! onde posso baixar o Socket? poderia me indicar?

    • @Delphipracticalschool
      @Delphipracticalschool  8 лет назад +2

      If google translate translated this good, thank you :-) Socket components can be installed from "bin" folder of Embarcadero RAD studio, for example if you use Embarcadero XE than you can find it in :
      " C:\ProgramFiles\Embarcadero\RAD Studio\8.0\Bin\" named something like "dclsockets230.bpl"(this one is from Embarcadero Seatle , see this link : docwiki.embarcadero.com/RADStudio/Seattle/en/Installing_Socket_Components)

  • @psproject4994
    @psproject4994 5 лет назад

    Harus menggunakan 2 computer ?

  • @SalmanZaxSA
    @SalmanZaxSA 7 лет назад

    i am vb coding i see the delphi so easy and fast

  • @ninaaninq5567
    @ninaaninq5567 6 лет назад

    هل استطيع السؤال بالعربية ارجوكم

  • @asgerjrgensen1414
    @asgerjrgensen1414 4 года назад

    Say something

  • @jeanrodrigues6249
    @jeanrodrigues6249 3 года назад

    Floppy