root/src/dps8/fnpuv.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * vim: filetype=c:tabstop=4:ai:expandtab
   3  * SPDX-License-Identifier: ICU
   4  * scspell-id: 34c5cd04-f62f-11ec-b27c-80ee73e9b8e7
   5  *
   6  * ---------------------------------------------------------------------------
   7  *
   8  * Copyright (c) 2016 Charles Anthony
   9  * Copyright (c) 2021-2022 The DPS8M Development Team
  10  *
  11  * All rights reserved.
  12  *
  13  * This software is made available under the terms of the ICU
  14  * License, version 1.8.1 or later.  For more details, see the
  15  * LICENSE.md file at the top-level directory of this distribution.
  16  *
  17  * ---------------------------------------------------------------------------
  18  */
  19 
  20 typedef void (* uv_read_cb_t)  (uv_tcp_t * client, ssize_t nread, unsigned char * buf);
  21 typedef void (* uv_write_cb_t) (uv_tcp_t * client, unsigned char * data, ssize_t datalen);
  22 struct uvClientData_s
  23   {
  24     bool assoc;
  25     uint fnpno;
  26     uint lineno;
  27     /* telnet_t */ void * telnetp;
  28     uv_read_cb_t  read_cb;
  29     uv_write_cb_t write_cb;
  30     uv_write_cb_t write_actual_cb;
  31     // Work buffer for processLineInput
  32     char buffer [1024];
  33     size_t nPos;
  34     // 3270
  35     char * ttype;
  36     uint stationNo;
  37   };
  38 
  39 typedef struct uvClientData_s uvClientData;
  40 
  41 int fnpuvInit (int telnet_port, char * telnet_address);
  42 int fnpuv3270Init (int telnet3270_port);
  43 void fnpuv3270Poll (bool start);
  44 void fnpuvProcessEvent (void);
  45 void fnpuv_start_write (uv_tcp_t * client, unsigned char * data, ssize_t len);
  46 void fnpuv_start_writestr (uv_tcp_t * client, unsigned char * data);
  47 void fnpuv_send_eor (uv_tcp_t * client);
  48 void fnpuv_recv_eor (uv_tcp_t * client);
  49 void fnpuv_start_write_actual (uv_tcp_t * client, unsigned char * data, ssize_t datalen);
  50 void fnpuv_associated_brk (uv_tcp_t * client);
  51 void fnpuv_unassociated_readcb (uv_tcp_t * client, ssize_t nread, unsigned char * buf);
  52 void fnpuv_associated_readcb (uv_tcp_t * client, ssize_t nread, unsigned char * buf);
  53 void fnpuv_read_start (uv_tcp_t * client);
  54 void fnpuv_read_stop (uv_tcp_t * client);
  55 void fnpuv_dial_out (uint fnpno, uint lineno, word36 d1, word36 d2, word36 d3);
  56 void fnpuv_open_slave (uint fnpno, uint lineno);
  57 void close_connection (uv_stream_t* stream);
  58 #ifdef TUN
  59 void fnpTUNProcessEvent (void);
  60 #endif
  61 void fnpuv_3270_readcb (uv_tcp_t * client,
  62                            ssize_t nread,
  63                            unsigned char * buf);
  64 void fnpuv_start_3270_write (uv_tcp_t * client, unsigned char * data, ssize_t datalen);
  65 void reset_line (struct t_line * linep);

/* [previous][next][first][last][top][bottom][index][help] */