www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - std.socket.TcpSocket.flush

reply Rory Mcguire <rjmcguire gm_no_ail.com> writes:
Hi,

What is one supposed to use to flush a TcpSocket.

flush doesn't seem to exist, should I really just use the c function?

-Rory
Jul 26 2010
parent reply Heywood Floyd <soul8o8 gmail.com> writes:
Rory Mcguire Wrote:

 Hi,
 
 What is one supposed to use to flush a TcpSocket.
 
 flush doesn't seem to exist, should I really just use the c function?
 
 -Rory
Was in a similar situation, found this: http://stackoverflow.com/questions/855544/is-there-a-way-to-flush-a-posix-socket I thought a socket needed to be flushed because curl and ab "hanged" when GETting from my server. Turns out I was just not sending the correct HTTP-headers... /HF
Jul 26 2010
parent Rory Mcguire <rjmcguire gm_no_ail.com> writes:
Heywood Floyd wrote:

 Rory Mcguire Wrote:
 
 Hi,
 
 What is one supposed to use to flush a TcpSocket.
 
 flush doesn't seem to exist, should I really just use the c function?
 
 -Rory
Was in a similar situation, found this: http://stackoverflow.com/questions/855544/is-there-a-way-to-flush-a-
posix-socket
 
 I thought a socket needed to be flushed because curl and ab "hanged" when
 GETting from my server. Turns out I was just not sending the correct
 HTTP-headers...
 
 /HF
Thanks. I've made this before but it was about 3 years ago now, and I can't remember what I did. Perhaps it was just TCP_NODELAY. telnet,smtp,http1.1, etc... all rely on the ability to send data without the while the client waits for a specific line. I'm sending a line when the client connects, which the client has to read in order to acknowledge, with a write but it never gets the data from the server. Suppose I'll have to find my backups... somewhere :(.
Jul 26 2010