It's a protocol like that: +-------+--------+-------------------------------+ |request| | | | name | len(4) | request body | | (4) | | | +-------+--------+-------------------------------+ request name: the name of the request, 4 chars, used for matching the processing command request data: the body of the request TODO: add isEncoded and isZipped flags
 public ApplicationManager(
     ITransportResource transportResource,
     IDtoSerializer dtoSerializer,
     IStorage storage,
     IDeviceInfo deviceInfo)
 {
     //we don't have autofac so let's build the tree 
     var commandParser = new CommandParser();
     var connectionManager = new ConnectionManager(transportResource, new CommandBuffer(commandParser), commandParser, new RequestsHandler(), dtoSerializer);
     
     AccountManager = new AccountManager(storage, deviceInfo, connectionManager, 
         new ProfileServiceProxy(connectionManager), 
         new RegistrationServiceProxy(connectionManager), 
         new AuthenticationServiceProxy(connectionManager));
     ChatManager = new ChatManager(connectionManager, new ChatServiceProxy(connectionManager), AccountManager);
     FriendsManager = new FriendsManager(connectionManager, new FriendsServiceProxy(connectionManager));
     SearchManager = new SearchManager(connectionManager, new UsersSearchServiceProxy(connectionManager));
     ConnectionManager = connectionManager;
 }
 public CommandBuffer(CommandParser commandParser)
 {
     _commandParser = commandParser;
 }
Exemple #3
0
 public CommandBuffer(CommandParser commandParser)
 {
     _commandParser = commandParser;
 }