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

cygserver_transport.cc « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7c6e5fe0039b7fae9b0c46bbb29d3427f50a0e38 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/* cygserver_transport.cc

   Copyright 2001 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. */

#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <windows.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include "wincap.h"
#include "cygwin/cygserver_transport.h"
#include "cygwin/cygserver_transport_pipes.h"
#include "cygwin/cygserver_transport_sockets.h"

/* to allow this to link into cygwin and the .dll, a little magic is needed. */
#ifndef __OUTSIDE_CYGWIN__
#include "winsup.h"
#else
#define debug_printf printf
#endif

/* The factory */
class transport_layer_base *create_server_transport()
{
  transport_layer_base *temp;
  /* currently there is only the base class! */
  if (wincap.is_winnt ())
    temp = new transport_layer_pipes ();
  else
    temp = new transport_layer_base ();
  return temp;
}


transport_layer_base::transport_layer_base ()
{
  /* should we throw an error of some sort ? */
}

void
transport_layer_base::listen ()
{
}

class transport_layer_base *
transport_layer_base::accept ()
{
  return NULL;
}

void
transport_layer_base::close()
{
}

ssize_t
transport_layer_base::read (char *buf, size_t len)
{
  return 0;
}

ssize_t
transport_layer_base::write (char *buf, size_t len)
{
  return 0;
}

bool
transport_layer_base::connect ()
{
  return false;
}

void
transport_layer_base::impersonate_client ()
{
}

void
transport_layer_base::revert_to_self ()
{
}