Recent

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

Awesome Programmer

  • Sr. Member
  • ****
  • Posts: 451
  • 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: 451
  • 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: 14373
  • Sensorship about opinions does not belong here.
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....
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018