![]() |
|
#1
|
|||
|
|||
Reading socket input streams.Hello, I'm currently trying to write a concurrent webserver in Unix. I need to process the Http requests seperately. I'm not using connect(), I'm just using accept and then I need to read the socket input stream and parse the Http request. After this I am trying to construct the response message and then send it to the client.
I've tried a few different ways to read the socket input stream, but I'm not getting anything that looks like an Http request. For instance I need to process... GET /somedir/page.html HTTP/1.0 (extra carriage return, line feed) I only need to worry about the GET function for the Http requests. I guess my question is what is the surefire way to read and parse this request from the socket? Any help would be greatly appreciated. Thanks. |
|
#2
|
|||
|
|||
Re: Reading socket input streams.Hi,
now i am fired up with the c++ . could u give me the answer for this one . we have typecasting operator in c. why we need some compelx typecasting operator in c++ like static_cast,dynamic_cast and reinterpret_cast. can u explaint some thing for it. thanks®ards robert.T |
|
#3
|
|||
|
|||
Re: Reading socket input streams.Please start new threads for new topics.
In C, typecasting is very dangerous because you can make the compiler pretend any type is any other type without a conversion function or anything. In C++, there are the four kinds of cast operators that do subtly different things. There are many resources on the Internet about these. Have you tried searching Google! Here's a good one (but there are many others): http://gethelp.devx.com/techtips/cpp...0min0701-2.asp @AJSHOPE: Quote:
|
Recent GIDBlog
Developing GUIs with wxPython (Part 3) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [PROGRAM] Winsock Programming | Max Payne | MS Visual C++ / MFC Forum | 1 | 08-Mar-2007 23:38 |
| Reading and Writing to a text file | raptorhawk | C++ Forum | 16 | 14-Apr-2005 13:09 |
| GradeBook Program | x3ro | C++ Forum | 19 | 03-Apr-2005 19:28 |
| [C] Discarding input | Alhazred | C Programming Language | 8 | 04-Aug-2004 11:45 |
| IP tables | rogermark100 | C Programming Language | 6 | 18-Apr-2004 07:22 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The