2003-11-19 19:49:41 +01:00
|
|
|
/* transport.h
|
2003-10-22 12:04:11 +02:00
|
|
|
|
|
|
|
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. */
|
|
|
|
|
2003-11-19 19:49:41 +01:00
|
|
|
#ifndef _TRANSPORT_H
|
|
|
|
#define _TRANSPORT_H
|
2003-10-22 12:04:11 +02:00
|
|
|
|
|
|
|
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__
|
2003-11-19 19:49:41 +01:00
|
|
|
virtual bool impersonate_client ();
|
|
|
|
virtual bool revert_to_self ();
|
2003-10-22 12:04:11 +02:00
|
|
|
#endif
|
|
|
|
|
2004-08-03 14:35:35 +02:00
|
|
|
virtual ~transport_layer_base ();
|
2003-10-22 12:04:11 +02:00
|
|
|
};
|
|
|
|
|
2003-11-19 19:49:41 +01:00
|
|
|
#endif /* _TRANSPORT_H */
|