Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^7: Adding simple HTTP controls to existing code

by huck (Prior)
on Jul 05, 2021 at 20:00 UTC ( #11134680=note: print w/replies, xml ) Need Help??


in reply to Re^6: Adding simple HTTP controls to existing code
in thread Adding simple HTTP controls to existing code

They have a similar base

Mine does a two step between accept and read, a client CAN create the connection and wait a bit before writing, so mine wont block there. But in general http: clients shouldnt matter.

His has a better read, the way i commonly use it is a lot like his, but i just collect data, then have another loop that looks for completed lines so i dont block on the \n. IN both of these examples we block on the \n read, mine till \n, his to blank line.

I added a cmd lookup table for what to execute

I only look at the first line sent.

I added the /null command to show you what might happen if you dont send anything back

  • Comment on Re^7: Adding simple HTTP controls to existing code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11134680]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2022-01-22 18:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (63 votes). Check out past polls.

    Notices?