|

楼主 |
发表于 2006-7-7 23:17:39
|
显示全部楼层
gtk-sopcast 0.2.2 的核心状态转移过程:
[php]
create socket, can connect to server? <---------------──────-|
| |
|--no->is sp-sc still running?----------yes------->-->delay 1s-|
yes | ^| |
| no->fork sp-sc--> |
| |
v |
parse http stream head |
| |
|---error?---yes->return |
| |
v |
stream data avalible? |
| |
|----no--->delay 1s ---------------------------------------------^
yes
|
v
open file for record, and bind socket to io channel
[/php]
用socket同sp-sc建立联接,将有三种情况,0.没有联接上。1.读到有http头,但没有读到别的数据。2.读到http头和数据 |
|