my spinneret was locking up think i fixed
zapmaster
Posts: 54
If i the web page is refreshed when a page was loading things would just lock up. I think this would lock if more then one person tried to get on my page at the same time.
the fix is i added
repeat
end '***ADDED TO STOP REFRESH LOCK UP***
'Waiting for a client to connect
PST.Str(string("Waiting for a client to connect....", PST#NL))
'Testing Socket 0's status register and looking for a client to connect to our server
repeat while !ETHERNET.SocketTCPestablished(0)
'Connection established
PST.Str(string("connection established..."))
'Initialize the buffers and bring the data over
bytefill(@data, 0, _bytebuffersize)
ETHERNET.rxTCP(0, @data)
if data[5] == "A" 'A = home page
home_page
if data[5] == "B" 'B = boiler page
boiler_page
if data[5] == "C" 'C = Solar page
Solar_page
if data[5] == "D" 'D = boiler fraim
boiler_fraim
if data[5] == "E" 'E = Solar fraim
Solar_fraim
if data[5] == "F" 'F = Boiler left fraim
Boiler_left_fraim
if data[5] == "H" 'G = Solar left fraim
Solar_left_fraim
if data[0] == "G"
home_page
pub end
PauseMSec(5)
'End the connection
ETHERNET.SocketTCPdisconnect(0)
PauseMSec(10)
'Connection terminated
ETHERNET.SocketClose(0)
PST.Str(string("Connection complete", PST#NL, PST#NL))
'Once the connection is closed, need to open socket again
OpenSocketAgain
the fix is i added
repeat
end '***ADDED TO STOP REFRESH LOCK UP***
'Waiting for a client to connect
PST.Str(string("Waiting for a client to connect....", PST#NL))
'Testing Socket 0's status register and looking for a client to connect to our server
repeat while !ETHERNET.SocketTCPestablished(0)
'Connection established
PST.Str(string("connection established..."))
'Initialize the buffers and bring the data over
bytefill(@data, 0, _bytebuffersize)
ETHERNET.rxTCP(0, @data)
if data[5] == "A" 'A = home page
home_page
if data[5] == "B" 'B = boiler page
boiler_page
if data[5] == "C" 'C = Solar page
Solar_page
if data[5] == "D" 'D = boiler fraim
boiler_fraim
if data[5] == "E" 'E = Solar fraim
Solar_fraim
if data[5] == "F" 'F = Boiler left fraim
Boiler_left_fraim
if data[5] == "H" 'G = Solar left fraim
Solar_left_fraim
if data[0] == "G"
home_page
pub end
PauseMSec(5)
'End the connection
ETHERNET.SocketTCPdisconnect(0)
PauseMSec(10)
'Connection terminated
ETHERNET.SocketClose(0)
PST.Str(string("Connection complete", PST#NL, PST#NL))
'Once the connection is closed, need to open socket again
OpenSocketAgain
Comments
Looking at you code it appears that you never execute any of the if statements, just "pub end" over and over again.
Yea i did not like how it looked what are code tags?
-Phil