1

Topic: Who as sockets or network libraries?

All greetings
Source codes from last operations are not present - I can not peep. And now I think of system scaling through microservices, indirect systems.
There is a whole ton of questions which it is necessary to understand. Asynchronous calls, support of a considerable quantity of sessions, authorization, enciphering, bales-aliv, .
Accordingly, it would be desirable to ask at local who as solves those or other questions of intercomputer interaction. Descriptions, pieces of the code and examples of units - are welcomed.

2

Re: Who as sockets or network libraries?

SOFT FOR YOU wrote:

Source codes from last operations are not present - I can not peep.

smile)) smile)) smile))

SOFT FOR YOU wrote:

who as solves those or other questions of intercomputer interaction. Descriptions, pieces of the code and examples of units - are welcomed.

Many years I use RealThinClient - weeds there is no place more abruptly.
Hundreds sessions, keep-alive built in, RPC, a compression, enciphering and much all another

3

Re: Who as sockets or network libraries?

defecator;
And this RealThinClient a thingummy, approaches for implementation of the server for game? A pier, we launch clients, we open ports through  at many users. We send given to it, and it quickly  and sends all answers, layouts of subjects - players, and so on?
Or it is more by other part

4

Re: Who as sockets or network libraries?

defecator wrote:

Many years I use RealThinClient - weeds there is no place more abruptly.
Hundreds sessions, keep-alive built in, RPC, a compression, enciphering and much all another

Wanted to look, and its site now -  sad
It paid?

5

Re: Who as sockets or network libraries?

defecator;
Throw off  on free implementation
It by the way ?
P.S. Heard still about ZMQ. But there it is too much source codes for me, especially on unloved With ++)

6

Re: Who as sockets or network libraries?

alekcvp;
For the
https://github.com/maciej-izak/sdk-lite … 61977d0f3c

7

Re: Who as sockets or network libraries?

alekcvp wrote:

Wanted to look, and its site now -

[spoiler] AirVPN - I recommend. It is possible to deliver it is direct on a router. [/spoiler]

8

Re: Who as sockets or network libraries?

gamers;
Thanks!

9

Re: Who as sockets or network libraries?

And grpc in an ecosystem delphi it is mute?

10

Re: Who as sockets or network libraries?

When I rested against some restrictions dcom that to minimize alterations decided to drag midas-appendices on native tsocketconnection. To begin with it was necessary to correct simply it, then in addition the  heaped up. As a result clients/apservera actually it was not necessary to alter at all, only to replace transport and to add output agents for new features

11

Re: Who as sockets or network libraries?

Did bidirectional dialogue service <> , on ports. Communicates with help TIdCmdTCPClient/TIdCmdTCPServer, it is more 70 than commands in both sides it is processed, works without problems. After arrival  all it ' the riches ' are written off for not need. There would be it earlier would not potter at all.

12

Re: Who as sockets or network libraries?

Speak, Indy angrily. There each connection in a separate flow

13

Re: Who as sockets or network libraries?

SOFT FOR YOU wrote:

Speak, Indy angrily. There each connection in a separate flow

It, of course, angrily. Use libuv, allows to process in one flow many connections.

14

Re: Who as sockets or network libraries?

Degtyaryov Evgenie;
And than it is better RTC?

15

Re: Who as sockets or network libraries?

Evgenie wrote:

it is passed...
It, of course, angrily. Use libuv, allows to process in one flow many connections.

Something Delphi-port very old...

16

Re: Who as sockets or network libraries?

Degtyaryov Evgenie;
For the applications suffices.  the network hammers completely.

17

Re: Who as sockets or network libraries?

makhaon wrote:

for the applications suffices.  the network hammers completely.

As I understood a problem in that that hammers hammers, and in flows

18

Re: Who as sockets or network libraries?

Explain me the circuit  connections
Whether correctly I understand that there is one flow which finds the data from a socket, reads and  steams out the data, then puts them in any queue. And there the thread pool which process received  the data already works.
And on proceeding packets too it is not clear. For outbox the same flow answers, or create another?
Well explain a situation) more shortly. It is desirable with the code.

19

Re: Who as sockets or network libraries?

SOFT FOR YOU;
At me synopse
It is arranged so
[spoiler]

TTCPDaemon = class (TThread)
private
fSock: TTCPBlockSocket;
fPort: string;
public
property Port: string read fPort write fPort;
constructor Create (APort: string);
destructor Destroy; override;
procedure Execute; override;
end;
TSQLDaemon = class (TThread)
private
fClient: string;
fSock: TTCPBlockSocket;
fTimeOut: integer;
fDBConn: TDBConnection;
public
property TimeOut: integer read fTimeOut write fTimeOut;
procedure Stop;
procedure SendData (AStatus: Integer; AStream: TMemoryStream);
procedure SendStream (AStream: TMemoryStream);
procedure SendString (AValue: PChar);
constructor Create (HSock: TSocket; Client: string);
destructor Destroy; override;
procedure Execute; override;
end;
rocedure TTCPDaemon. Execute;
var
s: string;
sIP: string;
ClientSock: TSocket;
begin
try
fSock. CreateSocket;
fSock. SetLinger (True, 1);
fSock. Bind (' 0.0.0.0 ', fPort);
fSock. Listen;
if fSock. LastError <> 0 then begin
s: = ' Error status code ' + IntToStr (fSock. LastError) + #13#10 + fSock. LastErrorDesc;
raise Exception. Create (s);
end;//if fSock. LastError <> 0
repeat
if Terminated then Break;
if fSock. CanRead (1000) then begin
ClientSock: = fSock. Accept;
if fSock. LastError <> 0 then begin
s: = ' Socket LastError ' + IntToStr (fSock. LastError) + #13#10 + fSock. LastErrorDesc;
raise Exception. Create (s);
end;//if fSock. LastError <> 0
sIP: = fSock. GetRemoteSinIP + ': ' + IntToStr (fSock. GetRemoteSinPort);
//ClientAdd (sIP);
TSQLDaemon. Create (ClientSock, sIP);
end;//if CanRead (1000)
Sleep (1);
until False;
except
on E:Exception do begin
s: = E.Message;
SaveToLog (s);
end;
end;
end;

[/spoiler]

20

Re: Who as sockets or network libraries?

SOFT FOR YOU;
At me the similar code, is a little with another .
Whether

wrote:

Correctly I understand that there is one flow which finds the data from a socket, reads and  steams out the data, then puts them in any queue. And there the thread pool which process received  the data already works.

There is one flow which expects entering connection. If connection came - there is a new flow on this connection and within it all connection is processed.

wrote:

And on proceeding packets too it is not clear. For outbox the same flow answers, or create another?

TCP connections bidirectional if it means.

21

Re: Who as sockets or network libraries?

MaratIsk;
For thanks code
In essence it is not clear, and here sessions, connections and flows)
makhaon;
The approach as in Indy. Does not approach for a considerable quantity of connections

22

Re: Who as sockets or network libraries?

SOFT FOR YOU;
What sessions, connections?!

23

Re: Who as sockets or network libraries?

MaratIsk;
Which at you are not present smile
In my understanding there is a client application which installs connection with your server, in this occasion session opens and any time is accompanied

24

Re: Who as sockets or network libraries?

SOFT FOR YOU wrote:

MaratIsk;
Which at you are not present smile
In my understanding there is a client application which installs connection with your server, in this occasion session opens and any time

is accompanied
Begin from the beginning

25

Re: Who as sockets or network libraries?

defecator;
Elements for those who is not capable on . I ask the experience which has transited tests on years. But it is not addressed you. You only also can that  first on the Internet .