On 2020-08-27 23:42, Andreas via fpc-pascal wrote:

Hello Andreas,

I would like to use TCP in a DOS FPC project. I see in go32-v2
download page under "Optional-Files" the unit ufclndos. I downloaded
it but have not managed to find any documentation for it.

Well, the source file should provide at least basic idea. If you have a look at the source file of unit sslbase, i.e. the only unit from package fcl-net compiled for GO32v2, you can find that this unit provides just basis for classes for SSL support, however the implementation is dummy and needs to be replaced with the real one in a descendants of the classes defined there (that's also the reason why this unit is compiled for GO32v2 as well - it contains nothing specific to any platform and thus may be compiled for any FPC supported target). The descendants are provided in unit sslsockets, but this unit is _not_ provided for GO32v2. The reason is that this unit depends on unit sockets (which is the unit providing the real TCP/IP communication support). However, implementation of that unit for GO32v2 doesn't exist. In other words - as it stands now, this package isn't very useful for the GO32v2 target.


1) Is there any documentation for this unit?

Not that I'd be aware of. However, this particular unit isn't very useful by itself (for any FPC target).


2) Can this unit be used to create a server for a TCP connection?

No, see above. You'd need to have unit sockets implemented first. Moreover, SSL support would need a port of the OpenSSL library to GO32v2. This library is being loaded dynamically on targets currently supported by the respective FPC unit (openssl.pas included in FPC package openssl), but a potential port to GO32v2 would probably need to be linked statically (i.e. support for static linking of this library would need to be added to that unit).


3) How does the unit "talk" with the 16-bit DOS packet driver?

It doesn't. Somebody would need to provide an implementation of unit sockets for GO32v2 first, then the implementation for unit openssl (if you intend to use encrypted communication). Unit sockets would already allow implementing simple client/server communication. There are more advanced units provided with FPC (e.g. in package fcl-web), but these have additional dependencies - i.e. additional units would need to be adapted for the GO32v2 target first (e.g. ssockets). All of this isn't supported for target GO32v2 at the moment.

Tomas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to