root/src/dps8/uvutil.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: 6ae968db-f630-11ec-991c-80ee73e9b8e7
   5  *
   6  * ---------------------------------------------------------------------------
   7  *
   8  * Copyright (c) 2007-2013 Michael Mondy
   9  * Copyright (c) 2012-2016 Harry Reed
  10  * Copyright (c) 2013-2018 Charles Anthony
  11  * Copyright (c) 2015 Eric Swenson
  12  * Copyright (c) 2021-2023 The DPS8M Development Team
  13  *
  14  * All rights reserved.
  15  *
  16  * This software is made available under the terms of the ICU
  17  * License, version 1.8.1 or later.  For more details, see the
  18  * LICENSE.md file at the top-level directory of this distribution.
  19  *
  20  * ---------------------------------------------------------------------------
  21  */
  22 
  23 #ifndef UVUTIL_H
  24 # define UVUTIL_H
  25 
  26 struct uv_access_s
  27   {
  28     uv_loop_t * loop;
  29     int port;
  30     char * address;
  31 # define PW_SIZE 128
  32     char pw[PW_SIZE + 1];
  33     char pwBuffer[PW_SIZE + 1];
  34     int pwPos;
  35 
  36     void (* connectPrompt) (uv_tcp_t * client);
  37     void (* connected) (uv_tcp_t * client);
  38     bool open;
  39     uv_tcp_t server;
  40     uv_tcp_t * client;
  41     bool useTelnet;
  42     void * telnetp;
  43     bool loggedOn;
  44     unsigned char * inBuffer;
  45     uint inSize;
  46     uint inUsed;
  47   };
  48 
  49 typedef struct uv_access_s uv_access;
  50 void accessStartWriteStr (uv_tcp_t * client, char * data);
  51 void uv_open_access (uv_access * access);
  52 # ifndef QUIET_UNUSED
  53 void accessPutStr (uv_access * access, char * str);
  54 void accessPutChar (uv_access * access,  char ch);
  55 # endif
  56 int accessGetChar (uv_access * access);
  57 void accessStartWrite (uv_tcp_t * client, char * data, ssize_t datalen);
  58 void accessCloseConnection (uv_stream_t* stream);
  59 #endif

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