Problem using php socket

Back to PHP-IRC Bugs

Page: 1  
From User Message Body
garrettw
Post #1056
Member
Date: 6:27 am, Jul 6 2010
Posts: 1


My bot needs to communicate on a UDP socket, and I can't tell if that's possible with the framework's socket class... so I was going to use fsockopen() and do everything the normal way.
Problem: a subsequent fread() or fgets() causes the bot to hang.

Looking through the mods, I saw one that uses php's actual socket functions. I tried those, and got NO CHANGE.

Every one of the following functions fails: fread, fgets, socket_read, socket_recvfrom. So it looks like I have no options left but to scrap this framework and try something else -- because each of those functions works fine when i put the code in its own file and run it from the command line.

Last edited by garrettw at 8:08 am, Jul 6 2010

Mad_Clog
Post #1067
user avatar
Member
Date: 7:57 pm, Aug 12 2010
Posts: 176


Look at the 'Half-Life RCON' and the more up-to-date 'Source RCON' modules, if i remember correctly they both use UDP connections

   

Back to PHP-IRC Bugs