Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygserver_transport.h « cygwin « include « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 915f35e6651ffe59e232f36bc611814c4c9f4f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* cygserver_transport.h

   Copyright 2001, 2002 Red Hat Inc.

   Written by Robert Collins <rbtcollins@hotmail.com>

This file is part of Cygwin.

This software is a copyrighted work licensed under the terms of the
Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
details. */

#ifndef _CYGSERVER_TRANSPORT_
#define _CYGSERVER_TRANSPORT_

class transport_layer_base *create_server_transport ();

class transport_layer_base
{
public:
#ifndef __INSIDE_CYGWIN__
  virtual int listen () = 0;
  virtual class transport_layer_base *accept (bool *recoverable) = 0;
#endif

  virtual void close () = 0;
  virtual ssize_t read (void *buf, size_t len) = 0;
  virtual ssize_t write (void *buf, size_t len) = 0;
  virtual int connect () = 0;

#ifndef __INSIDE_CYGWIN__
  virtual void impersonate_client ();
  virtual void revert_to_self ();
#endif

  virtual ~transport_layer_base ();
};

#endif /* _CYGSERVER_TRANSPORT_ */