Comments for lNet – Lightweight networking library https://lnet.wordpress.com Networking for pros Fri, 21 Aug 2020 14:31:36 +0000 hourly 1 http://wordpress.com/ Comment on Sockets, Protocols and Sending by almindor https://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-8662 Fri, 21 Aug 2020 14:31:36 +0000 http://lnet.wordpress.com/?page_id=43#comment-8662 In reply to bd4kc.

You mean Nadle’s algorithm? That might produce individual packets but it depends on payload size and congestion/scheduling can still mean that the other side gets both sends as one receive. You really should create a messaging protocol if you need to receive individual packets separately.

]]>
Comment on Sockets, Protocols and Sending by lijumen https://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-8661 Fri, 21 Aug 2020 12:01:49 +0000 http://lnet.wordpress.com/?page_id=43#comment-8661 In reply to almindor.

THX for replay. My project is to communicate with an embedded device that is already set to TCP, but whose instruction format is a message, not a stream. So I can only look for a compromise. It is not known whether the “nodelay” parameter is useful.

]]>
Comment on Sockets, Protocols and Sending by bd4kc https://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-8660 Fri, 21 Aug 2020 11:53:43 +0000 http://lnet.wordpress.com/?page_id=43#comment-8660 In reply to lijumen.

Can be set TCP_NODELAY with tcpserver?

]]>
Comment on Sockets, Protocols and Sending by almindor https://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-8657 Thu, 20 Aug 2020 16:11:41 +0000 http://lnet.wordpress.com/?page_id=43#comment-8657 In reply to lijumen.

TCP does not support “messages”. That is anything you send via TCP is part of the same stream of bytes. You will need to make messaging work yourself by using a higher protocol or implementing something like count bytes at the start or a separator sequence.

]]>
Comment on Sockets, Protocols and Sending by lijumen https://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-8656 Thu, 20 Aug 2020 15:54:57 +0000 http://lnet.wordpress.com/?page_id=43#comment-8656 Hi,Thx for this great work。
May i send fix size bytes in a package ,using tcp send function?
when i call the send function more than onece,it seemed only one package be send,all data bytes merged in it。

]]>
Comment on Sockets, Protocols and Sending by lLama https://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-8447 Thu, 27 Feb 2020 17:39:26 +0000 http://lnet.wordpress.com/?page_id=43#comment-8447 In reply to almindor.

I see…
Thanks a lot for your reply!

]]>
Comment on Sockets, Protocols and Sending by Martin https://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-8442 Wed, 19 Feb 2020 19:54:11 +0000 http://lnet.wordpress.com/?page_id=43#comment-8442 I’m even surprised that Windows CE allows this to happen in the first place. Originally I never expected that to be the case.

]]>
Comment on Sockets, Protocols and Sending by Martin https://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-8441 Wed, 19 Feb 2020 19:50:18 +0000 http://lnet.wordpress.com/?page_id=43#comment-8441 In reply to almindor.

You want me to send you the code?
Please add a workaround for this case either inside the library, or let me send you mine. It was a major hassle to figure it out, especially because Windows CE is really limited in regards of debugging and as I said the company behind it was also uncooperative.
It was the Datalogic scanner model “Memor”. The revision called “X3” has a few other CE bugs already (GUI related) and this error happens way way way more often on the hardware revision than on the original Memor hardware. We weren’t able to use the X3 model until I finally figured it out, because even the short delay did only sometimes fix it. Depending on the network connection it didn’t really help, which is why I looked into it once again in 2019.

]]>
Comment on Sockets, Protocols and Sending by almindor https://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-8440 Wed, 19 Feb 2020 19:16:38 +0000 http://lnet.wordpress.com/?page_id=43#comment-8440 In reply to Martin.

Wow that’s quite a find! Glad it worked out in the end.

]]>
Comment on Sockets, Protocols and Sending by Martin https://lnet.wordpress.com/usage/sockets-protocols-and-sending/#comment-8439 Wed, 19 Feb 2020 18:10:48 +0000 http://lnet.wordpress.com/?page_id=43#comment-8439 Hey,

I left a message on here some time ago.
I finally figured out the UNDERLYING problem of it.

The problem is that on these Windows CE scanners the messages are not in the right order. It seems to happen when the network connection is too fast. It’s quite obviously a network driver/Windows CE bug, but the company behind them told me that they don’t really care about fixing it, because the CE Internet Explorer works with it.

You get a data received message before the connection established messages arrives.
That makes the data received message get discarded and thus the FTP startup is ignored, which then makes the program wait endlessly.

I added a boolean, where I remember that data has arrived and I check that boolean right when connection established was received and then act on it.

This solves the problem 100%. I can send you the code if you want me to.

Kind Regards

]]>