php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5849 fsockopen() buffers outgoing data
Submitted: 2000-07-29 02:31 UTC Modified: 2000-07-29 12:44 UTC
From: sean at dsnet dot net Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1pl2 OS: Redhat 6.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sean at dsnet dot net
New email:
PHP Version: OS:

 

 [2000-07-29 02:31 UTC] sean at dsnet dot net
I'm creating a IRC bot in PHP using fsockopen() but when I try to send data out like private messages and such, it only sends a few lines at a time then buffers. Once it finds more incoming data then it sends out another portion of what's in the buffer, so on and so forth. If I were to do fputs($socket,"msg\n") 10 times in a row, it wouldn't only actually output say 2,3 lines then stop and when more data came in it'd send a few more lines of it. I'm not sure what the problem is, I've tried to set_socket_block() to off, I've tried on as well and still no success.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-29 12:44 UTC] stas@php.net
Use fflush to flush the output.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 06:01:32 2024 UTC