1 /*******************************************************************************
2 
3     Informational (i.e. non-destructive) interface to an address IP socket.
4 
5     Copyright:
6         Copyright (c) 2009-2016 dunnhumby Germany GmbH.
7         All rights reserved.
8 
9     License:
10         Boost Software License Version 1.0. See LICENSE_BOOST.txt for details.
11         Alternatively, this file may be distributed under the terms of the Tango
12         3-Clause BSD License (see LICENSE_BSD.txt for details).
13 
14 *******************************************************************************/
15 
16 module ocean.sys.socket.model.IAddressIPSocketInfo;
17 
18 
19 
20 
21 import ocean.meta.types.Qualifiers;
22 import ocean.io.device.Conduit: ISelectable;
23 
24 
25 
26 public interface IAddressIPSocketInfo
27 {
28     /***************************************************************************
29 
30         Returns:
31             true if a client connection is currently established or false if not
32 
33     ***************************************************************************/
34 
35     bool connected ( );
36 
37 
38     /***************************************************************************
39 
40         Returns:
41             I/O device instance (file descriptor under linux)
42 
43     ***************************************************************************/
44 
45     ISelectable.Handle fileHandle ( );
46 
47 
48     /***************************************************************************
49 
50         Obtains the IP address most recently passed to bind() or connect() or
51         obtained by accept().
52 
53         Returns:
54             the current IP address.
55 
56     ***************************************************************************/
57 
58     cstring address ( );
59 
60 
61     /***************************************************************************
62 
63         Obtains the port number most recently passed to bind() or connect() or
64         obtained by accept().
65 
66         Returns:
67             the current port number.
68 
69     ***************************************************************************/
70 
71     ushort port ( );
72 }