LCOV - code coverage report
Current view: top level - discof/ipecho - fd_ipecho_server.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 1 0.0 %
Date: 2026-03-19 18:19:27 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_discof_ipecho_fd_ipecho_server_h
       2             : #define HEADER_fd_src_discof_ipecho_fd_ipecho_server_h
       3             : 
       4             : #include "../../util/fd_util_base.h"
       5             : 
       6           0 : #define FD_IPECHO_SERVER_MAGIC (0xF17EDA2CE5185EC8) /* FIREDANCER SIPECHO V0 */
       7             : 
       8             : struct fd_ipecho_server;
       9             : typedef struct fd_ipecho_server fd_ipecho_server_t;
      10             : 
      11             : struct fd_ipecho_server_metrics {
      12             :   ulong connection_cnt;
      13             :   ulong bytes_read;
      14             :   ulong bytes_written;
      15             :   ulong connections_closed_ok;
      16             :   ulong connections_closed_error;
      17             : };
      18             : 
      19             : typedef struct fd_ipecho_server_metrics fd_ipecho_server_metrics_t;
      20             : 
      21             : FD_FN_CONST ulong
      22             : fd_ipecho_server_align( void );
      23             : 
      24             : FD_FN_CONST ulong
      25             : fd_ipecho_server_footprint( ulong max_connection_cnt );
      26             : 
      27             : void *
      28             : fd_ipecho_server_new( void * shmem,
      29             :                       ulong  max_connection_cnt );
      30             : 
      31             : fd_ipecho_server_t *
      32             : fd_ipecho_server_join( void * shipe );
      33             : 
      34             : void
      35             : fd_ipecho_server_init( fd_ipecho_server_t * server,
      36             :                        uint                 address,
      37             :                        ushort               port,
      38             :                        ushort               shred_version );
      39             : 
      40             : void
      41             : fd_ipecho_server_fini( fd_ipecho_server_t * server );
      42             : 
      43             : /* fd_ipecho_server_close_conns closes all accepted connections on
      44             :    the server, but leaves the listen socket open. */
      45             : 
      46             : void
      47             : fd_ipecho_server_close_conns( fd_ipecho_server_t * server );
      48             : 
      49             : void
      50             : fd_ipecho_server_set_shred_version( fd_ipecho_server_t * server,
      51             :                                     ushort               shred_version );
      52             : 
      53             : void
      54             : fd_ipecho_server_poll( fd_ipecho_server_t * server,
      55             :                        int *                charge_busy,
      56             :                        int                  timeout_ms );
      57             : 
      58             : fd_ipecho_server_metrics_t *
      59             : fd_ipecho_server_metrics( fd_ipecho_server_t * server );
      60             : 
      61             : int
      62             : fd_ipecho_server_sockfd( fd_ipecho_server_t * server );
      63             : 
      64             : #endif /* HEADER_fd_src_discof_ipecho_fd_ipecho_server_h */

Generated by: LCOV version 1.14