CodingStreaming HTTP

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Mikee   
 To:  ALL
35556.6 

Heh.. fixed. It appears as though putting a small sleep like this:

 

usleep(100000);

 

is good enough to cause no CPU usage. :)

0/0
 Reply   Quote More 

 From:  Mikee   
 To:  ALL
35556.7 
This is my first attempt of streaming, if anyones interested in having a look..

Currently its minimized at 10kb of javascript... I dont expect it to get much bigger than that (maybe 15kb max).

Stick that on a PHP server somewhere and edit the details at the bottom of irc.php

php code:
 
$str = new IRCStream("localhost", 6667, $_GET["nick"]);
$str->Connect();
 


Connect to some random irc server somewhere. The room name is hardcoded in there somewhere too.. ($this->Send("JOIN #poop");) so you might wanan change that.

Then load up stream.html in your browser. It *should* work on most browsers. I've only been able to test this with a local IRC server, though.

For me, it works in IE6 and Firefox 2. I know chrome isnt working (iframe streaming isnt working).

Currently it only recieves data and sends data via the PHP script.. you cant send messages from the client yet (im gonna start work on that now).


Thoughts? :) locally, at least, it seems to work really smoothly.. im pretty sure it'd be quite easy to make a REALLY slick web msn client or IRC client using this technique.

Attachments:
stream.zip

0/0
 Reply   Quote More 

 From:  Mikee   
 To:  ALL
35556.8 

screen grab of it working.

 

the messages on the web irc client appear immediately.. locally, anyway.

Attachments:

0/0
 Reply   Quote More 

 From:  Mikee   
 To:  ALL
35556.9 

Huzzah. I got a new version working which now uses flash as a proxy if it can.

 

first it tries using ajax, then htmlfile, then flash then iframe :)

 

should work is pretty much every browser ever, now.

 

rather proud of this! just gotta get it sending messages now.. then THE WORLD IS MY OYSTER or something.

0/0
 Reply   Quote More 

 From:  Mikee   
 To:  ALL
35556.10 


Can anyone think of a better way to do that?

The 4 second check thing is the bit im most bothered about - I'd much rather messages get pushed straight to the server, but I cannae think of a way to do it.

red = outgoing data
purple = incoming data
0/0
 Reply   Quote More 

 From:  Mikee   
 To:  ALL
35556.11 

Can some people test this for me please?

 

I've tested in IE7/FF2/Chrome.

 

http://www.mikefranklin.me.uk/experiments/msn/msn.html

 

- it should look like MSN
- you should be able to drag it from side to side, and resize the width
- resizing the browser will cause the MSN app to resize. if you resize it smaller the image will get knocked out, like on the real msn.
- minimize button will set it to 0x, 0y, 300 px wide.
- maimize button will set it to full screen, as will double clicking
- close button should take you to google (dunno what else to do!)
- clicking on an input field with text in it should select it, unless its already selected (in which case it'll deselect)
- the 'email address' input field should have a down arrow on it.. the cursor should change to a 'arrow' cursor when its over the dropdown icon and clicking should make the menu appear. any clicks away from the menu will hide it. the menu items should have rollover states.
- all the elements title tags should match those on the real MSN

 


Issues i know about:
- moving the window to the right, then shrinking the browser window causes it to break
- the 'sign in' button is the wrong color
- the 'menu' doesnt fade in when it opens
- 'help' and 'online' menus dont work (yet)
- the tickboxes dont have the correct behaviors on them yet.
- signing in doesnt actually do anything yet.

0/0
 Reply   Quote More 

 From:  Manthorp  
 To:  Mikee      
35556.12 In reply to 35556.11 
All good.

Double clicking and maximize button don't revert to the original state if you use them a second time: don't know if that bothers you.

"We all have flaws, and mine is being wicked."
James Thurber, The Thirteen Clocks 1951

0/0
 Reply   Quote More 

 From:  ANT_THOMAS  
 To:  Mikee      
35556.13 In reply to 35556.11 

Double clicking obviously maximises the thing, but I feel once it is maximised double clicking should return it to previous or default size. If possible of course!

 

Otherwise it looks good.


0/0
 Reply   Quote More 

 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  Mikee      
35556.14 In reply to 35556.11 
The title bar graphic is broken in IE8 without Compatibility View turned on. It becomes OK when you move the mouse over it, though.

Attachments:

0/0
 Reply   Quote More 

Reply to All    
 

1–14

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats