PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, October 22, 2022

[FIXED] How can I open a TCP connection to a specific TCP port, send a string and read the response in Lazarus?

 October 22, 2022     freepascal, lazarus, sockets, tcp     No comments   

Issue

I'd like to do this without any external libraries if at all possible...

I want to open a TCP connection to a specific port on a specific IP address and then communicate by sending ANSI strings and receive an ANSI string response.

Sadly, I have no idea where to start with this, and searching the internet turns up what seem like pretty complex examples.

Can anyone give me any starting point?


Solution

You can use an excellent, free and multiplatform library called Synapse. It has built-in support for many protocols (FTP, HTTP, POP3, LDAP and so on), and it also allows you to implement your own protocols. You can write your own clients and servers with just few lines of code—amazing!

It has excellent debug capabilities, it's very fast and code efficient. Just look at the demos in the HOWTO area.

If you like detailed information regarding Synapse with Free Pascal and Lazarus look at Synapse (wiki).



Answered By - cezar
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing