Thread overview
My Client/Server Internet created with Dlang
Feb 02
Marcone
Feb 02
Marcone
February 02
Please see my code. What do you think about my bad code?

My Code: https://github.com/cerejavermelha/Dlang-Client-Server-Socket-Dropbear-Injector/blob/master/Dlang_Client_Server_Socket_Dropbear_Injector.d
February 02
Please answer me for these questions:

1. I can see in linked file one function conecta() (beside main()). This drive me to question: Is conecta() act one time as server and another time as client?

2. Do you introduce you app with:
import core.stdc.stdlib;
This drive me to question: Is the C API the the only way do access Internet?
February 02
> This drive me to question: Is the C API the the only way do access Internet?


Mean: from D lang, ofcourse...
February 02
On Tuesday, 2 February 2021 at 17:03:58 UTC, Energo Koder wrote:
> Please answer me for these questions:
>
> 1. I can see in linked file one function conecta() (beside main()). This drive me to question: Is conecta() act one time as server and another time as client?
>
> 2. Do you introduce you app with:
> import core.stdc.stdlib;
> This drive me to question: Is the C API the the only way do access Internet?

1. Server for receive local aplication and client to connect local applicatio to remote server i iternet.

2. core.stdc.stdlib is only for use function exit(0) for close proccess.
February 03
On Tuesday, 2 February 2021 at 17:03:58 UTC, Energo Koder wrote:
> Please answer me for these questions:
>
> 2. Do you introduce you app with:
> import core.stdc.stdlib;
> This drive me to question: Is the C API the the only way do access Internet?

The code uses std.socket for networking. This is part of Phobos and is heavily inspired by the BSD socket interface, but tweaks it into something more D-ish.