Eliminating Seperate Function in While Loop
This problem would probably have the same solution in all the "C" languages, but the code is C# so I posted here just in case there is a difference.
For my server program, I've written all the code, except for a few additional features (but the basics are there), and now I'm going through and just simplifying the code as much as possible. I've reduced a 12kb file into 39 lines of code. I could take that down even futher if I could figure out a way to do this. Right now, all the code for processing HTTP requests once they are recieved is handled by a single function, which makes separating HTTP from FTP very easy. The only problem is that in my HTTP code I have something like this:
Now mymethod() has several lines of code, so I can't really just place the statement on code in the loop, but just for the sake of having things kept in one method, I'd really like to eliminate the need to call a method outside of this one. Any ideas?
while(mymethod() == true)
// Execute all this code