* * *

Author Topic: How do you flush input and output buffer in lNet TCP component?  (Read 1346 times)

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 288
  • Programming is FUN only when it works :)
    • Cool Technology
I would like to know if anyone knows how to flush input and/or output buffer for TCP/IP connection using TLTCPComponent. If there is no built in mechanism to do this, what other options are there to do the same. Thanks in advance.  :(
« Last Edit: March 27, 2015, 07:13:10 pm by reltek »

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: How do you flush input and output buffer in lNet TCP component?
« Reply #1 on: March 27, 2015, 10:41:48 pm »
AFAIK INET is not make use of internal buffers propably you mean the buffer of the OS
for this is responsible the OS and all you have to do is to "wait" for a while when you hit its limits
this might help [ https://lnet.wordpress.com/usage/sockets-protocols-and-sending/ ]
« Last Edit: March 27, 2015, 10:44:31 pm by Never »
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 288
  • Programming is FUN only when it works :)
    • Cool Technology
Re: How do you flush input and output buffer in lNet TCP component?
« Reply #2 on: April 28, 2017, 05:54:43 pm »
AFAIK INET is not make use of internal buffers propably you mean the buffer of the OS
for this is responsible the OS and all you have to do is to "wait" for a while when you hit its limits
this might help [ https://lnet.wordpress.com/usage/sockets-protocols-and-sending/ ]

So, which means you have to just simple loop reading out what is in the buffer until there is nothing in the buffer to be read. lol...

Thaddy

  • Hero Member
  • *****
  • Posts: 4273
Re: How do you flush input and output buffer in lNet TCP component?
« Reply #3 on: April 28, 2017, 06:10:51 pm »
So, which means you have to just simple loop reading out what is in the buffer until there is nothing in the buffer to be read. lol...
Which is called: flush....
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus