1 /******************************************************************************* 2 3 Informational (i.e. non-destructive) interface to a connection handler. 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.net.server.connection.IConnectionHandlerInfo; 17 18 19 20 21 import ocean.io.model.IConduit: ISelectable; 22 23 24 public interface IConnectionHandlerInfo 25 { 26 /*************************************************************************** 27 28 Tells whether an I/O error has been reported for the socket since the 29 last assign() call. 30 31 Returns: 32 true if an I/O error has been reported for the socket or false 33 otherwise. 34 35 ***************************************************************************/ 36 37 bool io_error ( ); 38 39 /*************************************************************************** 40 41 Returns: 42 true if a client connection is currently established or false if 43 not. 44 45 ***************************************************************************/ 46 47 public bool connected ( ); 48 49 /*************************************************************************** 50 51 Returns: 52 I/O device instance (file descriptor under linux) 53 54 ***************************************************************************/ 55 56 public ISelectable.Handle fileHandle ( ); 57 58 /*************************************************************************** 59 60 Formats information about the connection into the provided buffer. This 61 method is called from the SelectListener in order to log information 62 about the state of all connections in the pool. 63 64 Params: 65 buf = buffer to format into 66 67 ***************************************************************************/ 68 69 void formatInfo ( ref char[] buf ); 70 }