http.cs ---------------------------- using System; using System.Collections; using System.IO; using System.Net; using System.Net.Sockets; using System.Threading;
public HttpProcessor(Socket s) { this.s = s; hashTable = new Hashtable(); }
public void process() { NetworkStream ns = new NetworkStream(s, FileAccess.ReadWrite); bs = new BufferedStream(ns); sr = new StreamReader(bs); sw = new StreamWriter(bs); parseRequest(); readHeaders(); writeURL(); s.Shutdown(SocketShutdown.SdBoth); ns.Close(); }