2 // This file defines the Options class for SSL-client-simple. IBM C++
3 // compiler's template auto-instantiator needs this in a separate file.
5 #ifndef ACE_SSL_CLIENT_SIMPLE_H
6 #define ACE_SSL_CLIENT_SIMPLE_H
8 #include "ace/SSL/SSL_SOCK_Stream.h"
9 #include "ace/Time_Value.h"
13 // Define the options for this test.
22 int parse_args (int argc
, ACE_TCHAR
*argv
[]);
23 // Parse the command-line arguments.
25 const ACE_Time_Value
&sleep_time () const;
26 // Return the amount of time to sleep in order to implement the
27 // proper transmission rates.
29 u_short
port () const;
30 // Port of the server.
32 const ACE_TCHAR
*host () const;
33 // Host of the server.
35 const char *quit_string () const;
36 // String that shuts down the client/server.
38 ssize_t
read (void *buf
, size_t len
, size_t &iterations
);
39 // Read from the appropriate location.
41 size_t message_len () const;
42 // Returns the length of the message to send.
44 const void *message_buf () const;
45 // Returns a pointer to the message.
52 // Initialize the message we're sending to the user and set up the
55 char *shared_client_test (u_short port
,
56 ACE_SSL_SOCK_Stream
&cli_stream
);
57 // Performs the shared behavior of the oneway and twoway client
60 void twoway_client_test ();
61 // Performs the twoway test.
63 void oneway_client_test ();
64 // Performs the oneway test.
66 const ACE_TCHAR
*host_
;
67 // Host of the server.
70 // Port of the server.
72 ACE_Time_Value sleep_time_
;
75 enum {QUIT_STRING_SIZE
= 128};
76 char quit_string_
[QUIT_STRING_SIZE
+ 1];
77 // String that shuts down the client/server.
80 // Size of the message we send to the server.
83 // Pointer to the message we send to the server.
85 ACE_HANDLE io_source_
;
86 // Are we reading I/O from ACE_STDIN or from our generator?
89 // Number of iterations.
92 // Are we running oneway or twoway?
95 #endif /* ACE_SSL_CLIENT_SIMPLE_H */