Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: remoting/protocol/connection_to_client.h

Issue 9316052: Log IP/port of host as well as client in Me2Me host (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/IpAddress/RouteChange s/end_point/remote_end_point and other nits Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/host_status_observer.h ('k') | remoting/protocol/connection_to_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ 6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Called when the network connection has failed. 46 // Called when the network connection has failed.
47 virtual void OnConnectionFailed(ConnectionToClient* connection, 47 virtual void OnConnectionFailed(ConnectionToClient* connection,
48 Session::Error error) = 0; 48 Session::Error error) = 0;
49 49
50 // Called when sequence number is updated. 50 // Called when sequence number is updated.
51 virtual void OnSequenceNumberUpdated(ConnectionToClient* connection, 51 virtual void OnSequenceNumberUpdated(ConnectionToClient* connection,
52 int64 sequence_number) = 0; 52 int64 sequence_number) = 0;
53 53
54 // Called on notification of a route change event, which happens when a 54 // Called on notification of a route change event, which happens when a
55 // channel is connected. 55 // channel is connected.
56 virtual void OnClientIpAddress(ConnectionToClient* connection, 56 virtual void OnRouteChange(ConnectionToClient* connection,
57 const std::string& channel_name, 57 const std::string& channel_name,
58 const net::IPEndPoint& end_point) = 0; 58 const net::IPEndPoint& remote_end_point,
59 const net::IPEndPoint& local_end_point) = 0;
59 }; 60 };
60 61
61 // Constructs a ConnectionToClient object for the |session|. Takes 62 // Constructs a ConnectionToClient object for the |session|. Takes
62 // ownership of |session|. 63 // ownership of |session|.
63 explicit ConnectionToClient(Session* session); 64 explicit ConnectionToClient(Session* session);
64 virtual ~ConnectionToClient(); 65 virtual ~ConnectionToClient();
65 66
66 // Set |event_handler| for connection events. Must be called once when this 67 // Set |event_handler| for connection events. Must be called once when this
67 // object is created. 68 // object is created.
68 void SetEventHandler(EventHandler* event_handler); 69 void SetEventHandler(EventHandler* event_handler);
(...skipping 16 matching lines...) Expand all
85 86
86 // These two setters should be called before Init(). 87 // These two setters should be called before Init().
87 virtual void set_host_stub(HostStub* host_stub); 88 virtual void set_host_stub(HostStub* host_stub);
88 virtual void set_input_stub(InputStub* input_stub); 89 virtual void set_input_stub(InputStub* input_stub);
89 90
90 private: 91 private:
91 // Callback for protocol Session. 92 // Callback for protocol Session.
92 void OnSessionStateChange(Session::State state); 93 void OnSessionStateChange(Session::State state);
93 94
94 void OnSessionRouteChange(const std::string& channel_name, 95 void OnSessionRouteChange(const std::string& channel_name,
95 const net::IPEndPoint& end_point); 96 const net::IPEndPoint& remote_end_point,
97 const net::IPEndPoint& local_end_point);
96 98
97 // Callback for channel initialization. 99 // Callback for channel initialization.
98 void OnChannelInitialized(bool successful); 100 void OnChannelInitialized(bool successful);
99 101
100 void NotifyIfChannelsReady(); 102 void NotifyIfChannelsReady();
101 103
102 void CloseOnError(); 104 void CloseOnError();
103 105
104 // Stops writing in the channels. 106 // Stops writing in the channels.
105 void CloseChannels(); 107 void CloseChannels();
(...skipping 12 matching lines...) Expand all
118 scoped_ptr<HostEventDispatcher> event_dispatcher_; 120 scoped_ptr<HostEventDispatcher> event_dispatcher_;
119 scoped_ptr<VideoWriter> video_writer_; 121 scoped_ptr<VideoWriter> video_writer_;
120 122
121 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); 123 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient);
122 }; 124 };
123 125
124 } // namespace protocol 126 } // namespace protocol
125 } // namespace remoting 127 } // namespace remoting
126 128
127 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ 129 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_
OLDNEW
« no previous file with comments | « remoting/host/host_status_observer.h ('k') | remoting/protocol/connection_to_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698