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 moduleocean.sys.socket.model.IAddressIPSocketInfo;
17 18 19 20 21 importocean.meta.types.Qualifiers;
22 importocean.io.device.Conduit: ISelectable;
23 24 25 26 publicinterfaceIAddressIPSocketInfo27 {
28 /***************************************************************************
29 30 Returns:
31 true if a client connection is currently established or false if not
32 33 ***************************************************************************/34 35 boolconnected ( );
36 37 38 /***************************************************************************
39 40 Returns:
41 I/O device instance (file descriptor under linux)
42 43 ***************************************************************************/44 45 ISelectable.HandlefileHandle ( );
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 cstringaddress ( );
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 ushortport ( );
72 }