How to flush a socket



 DEVELOP > c-Plus-Plus > How to flush a socket

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "iceman"
Date: 24 Jan 2008 06:59:46 PM
Object: How to flush a socket
Hi all,
HOw can I flush the socket.
eg
how can I ensure that the send takes place immediately
if (send(socketDescriptor, buf, strlen(buf) + 1, 0) < 0) {
int km=socketDescriptor.flush();
cerr << "cannot send data ";
close(socketDescriptor);
exit(1);
}
.

User: "Dennis Jones"

Title: Re: How to flush a socket 24 Jan 2008 11:20:49 PM
"iceman" <jeganmhn@gmail.com> wrote in message
news:c67f83b2-9c99-4e56-9538-a4dfc70b48d4@f47g2000hsd.googlegroups.com...

Hi all,
HOw can I flush the socket.

When I first read the subject line, my brain read it as, "How to flush a
toilet." I guess I've been sitting here at my desk too long! :-)
- Dennis
.

User: "Sam"

Title: Re: How to flush a socket 24 Jan 2008 07:12:39 PM
This is a MIME GnuPG-signed message. If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.
--=_mimegpg-commodore.email-scan.com-16106-1201223559-0002
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
iceman writes:

Hi all,
HOw can I flush the socket.

There's no such thing as a "socket" in the C++ language. You must be
referring to a resource that's provided by your operating system. This
newsgroup is for the discussion of the C++ language. Try asking in a
newsgroup or a mailing list that's more appropriate for your operating
system.
Generally, the BSD socket API does not define a mechanism to verify
succesful transmission of data over a socket. Eventually, if the receiver
fails to ACK, the socket will be marked as broken, and writes will fail, but
this will not happen until quite some time has elapsed.
--=_mimegpg-commodore.email-scan.com-16106-1201223559-0002
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQBHmTeHx9p3GYHlUOIRAoEaAJ4uYEUfL4ESAETeVxCjIFnb7FLWogCePJVd
9OY+hxV6wWYGZOVSdUCqoNw=
=mjoX
-----END PGP SIGNATURE-----
--=_mimegpg-commodore.email-scan.com-16106-1201223559-0002--
.

User: "iceman"

Title: Re: How to flush a socket 24 Jan 2008 07:03:49 PM
sorry it was supposed to be,
if (send(socketDescriptor, buf, strlen(buf) + 1, 0) < 0) {
cerr << "cannot send data ";
close(socketDescriptor);
exit(1);
}
.


  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER