Initial code to split client and server stream code

Split Server and Client stream. This is an initial code but server part work. Client part is not our goal for now