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-2024 The DPS8M Development Team
  10  *
  11  * This software is made available under the terms of the ICU License.
  12  * See the LICENSE.md file at the top-level directory of this distribution.
  13  *
  14  * ---------------------------------------------------------------------------
  15  */
  16 
  17 typedef void (* uv_read_cb_t)  (uv_tcp_t * client, ssize_t nread, unsigned char * buf);
  18 typedef void (* uv_write_cb_t) (uv_tcp_t * client, unsigned char * data, ssize_t datalen);
  19 struct uvClientData_s
  20   {
  21     bool assoc;
  22     uint fnpno;
  23     uint lineno;
  24     /* telnet_t */ void * telnetp;
  25     uv_read_cb_t  read_cb;
  26     uv_write_cb_t write_cb;
  27     uv_write_cb_t write_actual_cb;
  28     // Work buffer for processLineInput
  29     char buffer [1024];
  30     size_t nPos;
  31     // 3270
  32     char * ttype;
  33     uint stationNo;
  34   };
  35 
  36 typedef struct uvClientData_s uvClientData;
  37 
  38 int fnpuvInit (int telnet_port, char * telnet_address);
  39 int fnpuv3270Init (int telnet3270_port);
  40 void fnpuv3270Poll (bool start);
  41 void fnpuvProcessEvent (void);
  42 void fnpuv_start_write (uv_tcp_t * client, unsigned char * data, ssize_t len);
  43 void fnpuv_start_writestr (uv_tcp_t * client, unsigned char * data);
  44 void fnpuv_send_eor (uv_tcp_t * client);
  45 void fnpuv_recv_eor (uv_tcp_t * client);
  46 void fnpuv_start_write_actual (uv_tcp_t * client, unsigned char * data, ssize_t datalen);
  47 void fnpuv_associated_brk (uv_tcp_t * client);
  48 void fnpuv_unassociated_readcb (uv_tcp_t * client, ssize_t nread, unsigned char * buf);
  49 void fnpuv_associated_readcb (uv_tcp_t * client, ssize_t nread, unsigned char * buf);
  50 void fnpuv_read_start (uv_tcp_t * client);
  51 void fnpuv_read_stop (uv_tcp_t * client);
  52 void fnpuv_dial_out (uint fnpno, uint lineno, word36 d1, word36 d2, word36 d3);
  53 void fnpuv_open_slave (uint fnpno, uint lineno);
  54 void close_connection (uv_stream_t* stream);
  55 #if defined(TUN)
  56 void fnpTUNProcessEvent (void);
  57 #endif /* if defined(TUN) */
  58 void fnpuv_3270_readcb (uv_tcp_t * client,
  59                            ssize_t nread,
  60                            unsigned char * buf);
  61 void fnpuv_start_3270_write (uv_tcp_t * client, unsigned char * data, ssize_t datalen);
  62 void reset_line (struct t_line * linep);

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