Hi,
what is the best way to provide followings?
1) Server Client sides
2) File serving by client request
3) Streaming by segments with iteration

sample code also please.

There is no one best way, it all depends on your actual requirements.
There is lots of info and sample code on the web to help you if you take a moment or two to look for it.

DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"
http://www.daniweb.com/community/rules