repeating myself

for the blo.gs cloud service, i had written a little server in php that took input from connections on a unix domain socket and repeated it out to a number of external tcp connections. but it would keep getting stuck when someone wasn’t reading data fast enough, and i couldn’t figure out how to get the php code to handle that.

so i rewrote it in c. it’s only 274 lines of code, and it seems to work just fine. it was actually a pretty straightforward port from php to c, although i had to spend some quality time refreshing my memory on how all the various socket functions work.

there’s a visible bump in the graph of my outgoing bandwidth from after this was fixed.

» blo.gs, php, code, feedmesh
« january 18, 2005 9:06pmthe bandwidth bump »

comments

Are you running cacti or something similar and is their general access to the reports? I'd love to see the, "visible bump in the graph of my outgoing bandwidth..."

» Jason Perkins (link) » january 20, 2005 4:20am

You could always add the compression ... =) (although you might want to do it on a different port by now and give us a week or two to change).

:-)

- ask

» Ask Bjørn Hansen (link) » january 20, 2005 7:08pm

this entry is closed to new comments.