[fpc-pascal] Basic Sockets in FreePascal

Michael Van Canneyt michael at freepascal.org
Sun Jul 26 17:06:58 CEST 2015



On Sun, 26 Jul 2015, Coyo wrote:

> I have read on the wiki and documentation that FreePascal does not have any native support for socket handling, and that you need an external third party library to have any support for it.

This is not correct. 
Of course Free Pascal has native support for socket handling ?

>
> I want to write an IRC bot in FreePascal, but I need the ability to both make outgoing connections to IRC servers or other bots of the same kind, as well as accept incoming connections from other bots.
>
> I'd prefer as straightforward TCP sockets support as I can get. Any advice would be greatly appreciated. Thank you in advance for your time and patience.

Just use the sockets or ssockets units. 
The first is plain pascal and a straightforward interface as you encounter it in any C implementation, the second is using classes.

Michael.



More information about the fpc-pascal mailing list