Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error with autoflush

Status
Not open for further replies.

tabaar

Programmer
Joined
Jun 12, 2001
Messages
34
Location
US
Hi, all! Maybe it's a little offtopic, but...

I have 2 progs, 1st is a socket-server, written in VC++6.0 using CSocket with default initialization. The 2nd is a Perl script, wich is called by this program. Script connects to the server in such way:

use Socket;
$host="localhost";
$port="1906";
socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp'));
connect(SOCK, sockaddr_in($port, inet_aton($host)));
$| = 1;

But $| doesn't work! All data sent from script to server is buffered and the server receives it ALL when the script is finishes working. What's wrong (maybe it's VC's CSocket error)?

Great Thanx!
 
have you tried using autoflush by doing something like:

use IO::Handle;
FILE_HANDLE->autoflush(1);

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top