Category: Delphi Sockets

  • Read bytes from TCP socket in Delphi

    To read bytes from a TCP socket in Delphi, you can use various components or libraries that provide TCP/IP functionality. One of the commonly used components is the TTCPBlockSocket from the Synapse library. Below is a basic example of reading bytes from a TCP socket using Synapse: Download Synapse: Download the Synapse library from its…

  • Connect MQTT in Delphi?

    Delphi does not have a standard MQTT library included with the IDE, and the availability of third-party libraries can vary. As of my last knowledge update in January 2022, there might be changes or new libraries developed after that time. If you are having difficulty finding an MQTT library for Delphi, consider using the Synapse…

  • How can I use dropbox rest api in Delphi

    To use the Dropbox REST API in Delphi, you will need to do the following: Obtain an access token: In order to use the Dropbox REST API, you will need to obtain an access token by creating a Dropbox API app and obtaining the necessary permissions from the user. Install the Delphi REST Client Components:…

  • How can i get Internet connected state in Delphi

    To check the Internet connection state in Delphi, you can use the TIdHTTP component from the Indy library. This component provides a Head method that allows you to send an HTTP HEAD request to a specified URL. You can use this method to check the connection to a known website, such as “www.google.com“. Here is…

  • How can I use VirusTotal API in Delphi

    To use the VirusTotal API in Delphi, you will need to perform the following steps: Obtain an API key from VirusTotal. You can do this by signing up for a free account at https://www.virustotal.com/gui/join-us. Install the Delphi REST Client Library, which is a framework for consuming RESTful web services in Delphi. You can find more…

  • How can I make partial download in Delphi

    To make a partial download in Delphi, you can use the TIdHTTP component from the Indy library. Here is an example of how to use it: uses IdHTTP; var HTTP: TIdHTTP; Stream: TMemoryStream; URL: string; StartPos, EndPos: Int64; begin HTTP := TIdHTTP.Create(nil); try Stream := TMemoryStream.Create; try URL := ‘http://www.example.com/file.zip’; StartPos := 0; EndPos :=…

  • How can I convert JSON to object in Delphi

    To convert JSON to a class in Delphi, you can use the TJSON.Parse method provided by the REST.Json unit. This method takes a string representation of a JSON object or array and converts it to a Delphi object or array. Here is an example of how to use TJSON.Parse to convert a JSON object to…

  • How can I use SOAP client and server in Delphi

    To use SOAP in Delphi, you can use the THTTPRIO component from the Indy library. The Indy library is a set of Delphi components that support a variety of Internet protocols, including HTTP and SOAP. To install the Indy library, follow these steps: Download the Indy library from the following URL: https://www.indyproject.org/download/Sockets.zip Extract the downloaded…

  • How can I upload, download and list FTP in Delphi

    To perform FTP operations in Delphi, you can use the TIdFTP component from the Indy library. The Indy library is a set of Delphi components that support a variety of Internet protocols, including FTP. To install the Indy library, follow these steps: Download the Indy library from the following URL: https://www.indyproject.org/download/Sockets.zip Extract the downloaded archive…

  • How can I use paypal api in Delphi

    To use the PayPal API in Delphi, you will need to obtain API credentials from PayPal and install the PayPal API SDK for Delphi. To obtain API credentials, follow these steps: Log in to your PayPal account and go to the Developer Portal. Click on the “My Apps & Credentials” tab in the top menu.…