Index: net/socket/server_socket.h |
diff --git a/net/socket/server_socket.h b/net/socket/server_socket.h |
index 11151eea1539636928b64aee65876dfacd9e60ec..74721a884c2004b811e0f483b38d45ee88b28781 100644 |
--- a/net/socket/server_socket.h |
+++ b/net/socket/server_socket.h |
@@ -16,17 +16,25 @@ class StreamSocket; |
class NET_EXPORT ServerSocket { |
public: |
- ServerSocket() { } |
- virtual ~ServerSocket() { } |
+ ServerSocket(); |
+ virtual ~ServerSocket(); |
- // Bind the socket and start listening. Destroy the socket to stop |
+ // Binds the socket and start listening. Destroy the socket to stop |
// listening. |
virtual int Listen(const net::IPEndPoint& address, int backlog) = 0; |
+ // Binds the socket with address and port, and start listening. It expects |
+ // a vaild IPv4 or IPv6 address. Otherwise, it returns ERR_ADDRESS_INVALID. |
+ // Subclasses may override this function if |address_string| is in a different |
+ // format, for example, unix domain socket path. |
+ virtual int ListenWithAddressAndPort(const std::string& address_string, |
mmenke
2014/06/26 15:36:10
need to include <string>
byungchul
2014/06/26 18:09:23
Done.
|
+ int port, |
+ int backlog); |
+ |
// Gets current address the socket is bound to. |
virtual int GetLocalAddress(IPEndPoint* address) const = 0; |
- // Accept connection. Callback is called when new connection is |
+ // Accepts connection. Callback is called when new connection is |
// accepted. |
virtual int Accept(scoped_ptr<StreamSocket>* socket, |
const CompletionCallback& callback) = 0; |