Errors, bugs, questions - page 2378

 
Renat Fatkhullin:

1. this is the interface.

TLS functions are auxiliary to support complex cases. No problem with setting SocketTimeouts - these are the best ones to use.


2. It performs its function correctly.

Apparently you are not aware of the problems of detecting broken TCP connections. It is quite difficult (resource intensive at the cost of extra calls) to detect that a connection is guaranteed to be broken correctly. All network implementations suffer from this problem.

Our implementation of SocketIsReadible is smart enough to have a break detector. When it detects a clean 0 bytes, it does the extra work of checking that the socket is complete:

Since it returns the number of bytes without a termination flag, it outputs 1 byte so that a subsequent/imminent SocketRead read attempt will normally return an error.

Why is this correct? Because most of the code is written by programmers in this way:

the actual result of the operation is checked on a direct read attempt.


3. it needs to do SocketIsReadible() before the actual read, if you don't know the exact size of the data to be read.

The SocketisReadible/SocketRead bind gives you the ability to not lose control (minimize to almost zero loss of control) over the execution flow of your program. This avoids flying into network timeouts.

Yes, a few lines more code, but you won't lose control for a millisecond(roughly). It's up to you to decide what to do in the intervals of no network data.


4. explained in the second paragraph.

Issue 1 for the sake of read stimulation and output as a read error.



Your conclusions are wrong.

This is the nature of TCP/IP transport, where there are no guarantees at all. You can get into network black holes there too on filters/firewalls when there is no TCP signalling part. Raw timeout and data flow control allows you to detect them and terminate connections yourself.

We've given a raw/direct access interface to network functions, including TLS implementations. If you use them, you are the one who needs to properly wrap the raw functions in a secure/controlled SocketIsReadible/SocketRead handler.

If you want to make high-level requests without having to think about the minutiae, there areWebRequest functions. All the protections are built in there.

Thank you very much for the reply provided.

In my humble opinion though:
1. If the SocketRead and SocketTlsRead functions perform the same action, then they should have the same adapted interfaces, by all means.

2. a. Yes, I don't know anything about problems with TCP connection break detection;
b) the SocketIs* function, according to function naming recommendations, is expected to produce True/False result, but not uint; (Where did you read that? If I'm not mistaken in Scott Meyers works in 2014).
c) Thanks for explaining why SocketIsReadible can return 1 if no TCP connection was established at all (no internet in advance or domain not added to allowed list).
Please add an appropriate description to the documentation as well.

3,4) Got it, thanks.

 

Hi all.

Please help in solving a problem with MT5 tester version 1940 - not counting Profit. I have 3 versions of MT5 (from broker and downloaded from manufacturer's site), installed on different PCs, all results are the same - not counting Profit, not working testing and optimization.

I have recorded a video to illustrate.


 

K-Meleon does not show text in messages

K-Meleon :: Главная
K-Meleon :: Главная
  • kmeleon.geckoworld.ru
На этой неделе суммарное число загрузок всех версий Pro-сборки K-Meleon (75-76 Pro) по официальным ссылкам превысило 100 000! Конечно не каждая загрузка - это новый пользователь, но ведь наш браузер раздается и на торрентах, а также разошелся по другим площадкам, откуда его тоже качают. Таким образом, мы можем уверенно говорить о том, что наше...
 
fxsaber:

K-Meleon does not show text in messages

It's a dead browser, there's probably no point in trying to get it to work...

 
Vladimir Pastushak:

It's a dead browser, so there's probably no point in making a spin on it...

It's not resource-hungry.

 
fxsaber:

It's not resource demanding.

Yes, you can see that, I've tried it on some sites, it has a lot of problems...

Try Vivaldi beta version, handy, fast, lots of facilities, lots of settings, supports chrome applications....

 
When I try to update my script in kodobase I get only one error
main file not found

the only MQ5 file is in this path

MQL5\Scripts\fxsaber\

How to fix it?


SZZ is showing "Verified by moderator" status.

I put the mq5 file just in Scripts - same reaction.
 
fxsaber:
When I try to update my script in kodobase I get only one error

the only MQ5 file is in this path

How to fix it?


SZZ is showing "Verified by moderator" status.

SZY I put the mq5-file simply in Scripts - same reaction.
Do not write your folder in the path.
 
Vladimir Karputov:
Do not write your own folder in the path.

Choosing the 'default' option worked. But only this option is wrong.

It is very unreasonable to put all the scripts in one folder. There should at least be systematization by subfolders.

 
fxsaber:

Choosing the 'default' option worked. But only this option is wrong.

It is very unreasonable to put all the scripts in one folder. There should be systematization at least by subfolders.

I have recently just asked about individual folders, the answer was: "all in a pile" and will not change yet.
If I need it badly for inluders, I add "KVN" to the file name.
Reason: