summaryrefslogtreecommitdiff
path: root/ace/SSL/SSL_SOCK.i
blob: dc21bfbdba136f08a191b62c4104142cf2b3608b (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
// -*- C++ -*-
// $Id$

ASYS_INLINE void
ACE_SSL_SOCK::set_handle (ACE_HANDLE fd)
{
  this->ACE_SOCK::set_handle (fd);
}

ASYS_INLINE ACE_HANDLE
ACE_SSL_SOCK::get_handle (void) const
{
  // return this->ssl_ ? (ACE_HANDLE) ::SSL_get_fd (this->ssl_) : ACE_INVALID_HANDLE;
  return this->ACE_SOCK::get_handle ();
}


ASYS_INLINE int 
ACE_SSL_SOCK::control (int cmd, void *arg) const
{
  return ACE_OS::ioctl (this->get_handle (), cmd, arg);
}

ASYS_INLINE int 
ACE_SSL_SOCK::set_option (int level, 
		     int option, 
		     void *optval, 
		     int optlen) const
{
//   switch (option)
//     {
//     case SO_SNDBUF:
//       return ::BIO_set_write_buffer_size (this->io_bio_, *((int *) optval));
//     case SO_RCVCBUF:
//       return ::BIO_set_read_buffer_size (this->io_bio_, *((int *) optval));
//     default:
      return ACE_OS::setsockopt (this->get_handle (),
				 level, 
				 option, (char *) optval,
				 optlen);
//    }
}

// Provides access to the ACE_OS::getsockopt system call.

ASYS_INLINE int 
ACE_SSL_SOCK::get_option (int level, 
		     int option, 
		     void *optval, 
		     int *optlen) const
{
//  switch (option)
//    {
//     case SO_SNDBUF:
//       return ::BIO_get_write_buffer_size (this->io_bio_, *((int *) optval));
//     case SO_RCVCBUF:
//       return ::BIO_get_read_buffer_size (this->io_bio_, *((int *) optval));
//    default:
      return ACE_OS::getsockopt (this->get_handle (),
				 level, 
				 option, (char *) optval,
				 optlen);
//    }
}