![]() |
|
[C#] Streams - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] Streams (/showthread.php?tid=5150663) |
Streams - Foreach - Jan 28, 2016 Hi Can anyone help me with understanding streams , learning C# , moving from a web language (php)? Like what is the logic behind them and why are they used? Any thing in PHP that relates to them? So far I understand there is FileStream , Normal Stream etc , and stream writer/reader is used to manipulate these streams? Dont really understand them... * - Odus - Jan 28, 2016 The clue is in the name: a stream of data. 😝 So a stream i.e. flow of information passing through, represents a passage for data. From there you can read, write, transform, whatever. Your question is a little vague though. If you can give something more specific then maybe I can offer more. * - Foreach - Jan 28, 2016 (Jan 28, 2016 04:46 PM)Odus Wrote: The clue is in the name: a stream of data. 😝 Like, when sending a HTTP Web request , you have to write to the stream to execute the request? What is the logical background behind that? * - Odus - Jan 28, 2016 (Jan 28, 2016 04:47 PM)Foreach Wrote: Like, when sending a HTTP Web request , you have to write to the stream to execute the request? A request and a response go hand in hand, you need to complete the request with a response if that makes any sense. Queuing the response (well, closing the stream) tells whatever we're sending to that there is nothing else to follow and it should begin its response. * - Odus - Jan 28, 2016 (Jan 28, 2016 04:56 PM)Snow32 Wrote: I am not sure but I think he wants to know the process of the http request. Oh, right. Step 1) Create a connection to the host/server/whatever Step 2) Set any headers or flags Step 3) Write the post data Step 4) Review response (if any) |