Deleted Added
full compact
BIO_s_connect.3 (100947) BIO_s_connect.3 (110010)
1.\" Automatically generated by Pod::Man version 1.15
1.\" Automatically generated by Pod::Man version 1.15
2.\" Tue Jul 30 09:21:09 2002
2.\" Mon Jan 13 19:27:04 2003
3.\"
4.\" Standard preamble:
5.\" ======================================================================
6.de Sh \" Subsection heading
7.br
8.if t .Sp
9.ne 5
10.PP

--- 122 unchanged lines hidden (view full) ---

133. ds Th \o'LP'
134. ds ae ae
135. ds Ae AE
136.\}
137.rm #[ #] #H #V #F C
138.\" ======================================================================
139.\"
140.IX Title "BIO_s_connect 3"
3.\"
4.\" Standard preamble:
5.\" ======================================================================
6.de Sh \" Subsection heading
7.br
8.if t .Sp
9.ne 5
10.PP

--- 122 unchanged lines hidden (view full) ---

133. ds Th \o'LP'
134. ds ae ae
135. ds Ae AE
136.\}
137.rm #[ #] #H #V #F C
138.\" ======================================================================
139.\"
140.IX Title "BIO_s_connect 3"
141.TH BIO_s_connect 3 "0.9.6e" "2000-11-12" "OpenSSL"
141.TH BIO_s_connect 3 "0.9.7" "2003-01-13" "OpenSSL"
142.UC
143.SH "NAME"
144BIO_s_connect, BIO_set_conn_hostname, BIO_set_conn_port,
145BIO_set_conn_ip, BIO_set_conn_int_port, BIO_get_conn_hostname,
146BIO_get_conn_port, BIO_get_conn_ip, BIO_get_conn_int_port,
147BIO_set_nbio, BIO_do_connect \- connect \s-1BIO\s0
148.SH "SYNOPSIS"
149.IX Header "SYNOPSIS"
150.Vb 1
151\& #include <openssl/bio.h>
152.Ve
153.Vb 1
154\& BIO_METHOD * BIO_s_connect(void);
155.Ve
142.UC
143.SH "NAME"
144BIO_s_connect, BIO_set_conn_hostname, BIO_set_conn_port,
145BIO_set_conn_ip, BIO_set_conn_int_port, BIO_get_conn_hostname,
146BIO_get_conn_port, BIO_get_conn_ip, BIO_get_conn_int_port,
147BIO_set_nbio, BIO_do_connect \- connect \s-1BIO\s0
148.SH "SYNOPSIS"
149.IX Header "SYNOPSIS"
150.Vb 1
151\& #include <openssl/bio.h>
152.Ve
153.Vb 1
154\& BIO_METHOD * BIO_s_connect(void);
155.Ve
156.Vb 1
157\& BIO *BIO_new_connect(char *name);
158.Ve
156.Vb 8
159.Vb 8
157\& #define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0,(char *)name)
158\& #define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1,(char *)port)
159\& #define BIO_set_conn_ip(b,ip) BIO_ctrl(b,BIO_C_SET_CONNECT,2,(char *)ip)
160\& #define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port)
161\& #define BIO_get_conn_hostname(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)
162\& #define BIO_get_conn_port(b) BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)
163\& #define BIO_get_conn_ip(b,ip) BIO_ptr_ctrl(b,BIO_C_SET_CONNECT,2)
164\& #define BIO_get_conn_int_port(b,port) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,port)
160\& long BIO_set_conn_hostname(BIO *b, char *name);
161\& long BIO_set_conn_port(BIO *b, char *port);
162\& long BIO_set_conn_ip(BIO *b, char *ip);
163\& long BIO_set_conn_int_port(BIO *b, char *port);
164\& char *BIO_get_conn_hostname(BIO *b);
165\& char *BIO_get_conn_port(BIO *b);
166\& char *BIO_get_conn_ip(BIO *b, dummy);
167\& long BIO_get_conn_int_port(BIO *b, int port);
165.Ve
166.Vb 1
168.Ve
169.Vb 1
167\& #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
170\& long BIO_set_nbio(BIO *b, long n);
168.Ve
169.Vb 1
171.Ve
172.Vb 1
170\& #define BIO_do_connect(b) BIO_do_handshake(b)
173\& int BIO_do_connect(BIO *b);
171.Ve
172.SH "DESCRIPTION"
173.IX Header "DESCRIPTION"
174\&\fIBIO_s_connect()\fR returns the connect \s-1BIO\s0 method. This is a wrapper
175round the platform's \s-1TCP/IP\s0 socket connection routines.
176.PP
174.Ve
175.SH "DESCRIPTION"
176.IX Header "DESCRIPTION"
177\&\fIBIO_s_connect()\fR returns the connect \s-1BIO\s0 method. This is a wrapper
178round the platform's \s-1TCP/IP\s0 socket connection routines.
179.PP
177Using connect BIOs \s-1TCP/IP\s0 connections can be made and data
180Using connect BIOs, \s-1TCP/IP\s0 connections can be made and data
178transferred using only \s-1BIO\s0 routines. In this way any platform
179specific operations are hidden by the \s-1BIO\s0 abstraction.
180.PP
181Read and write operations on a connect \s-1BIO\s0 will perform I/O
182on the underlying connection. If no connection is established
183and the port and hostname (see below) is set up properly then
184a connection is established first.
185.PP

--- 6 unchanged lines hidden (view full) ---

192Calling \fIBIO_reset()\fR on a connect \s-1BIO\s0 will close any active
193connection and reset the \s-1BIO\s0 into a state where it can connect
194to the same host again.
195.PP
196\&\fIBIO_get_fd()\fR places the underlying socket in \fBc\fR if it is not \s-1NULL\s0,
197it also returns the socket . If \fBc\fR is not \s-1NULL\s0 it should be of
198type (int *).
199.PP
181transferred using only \s-1BIO\s0 routines. In this way any platform
182specific operations are hidden by the \s-1BIO\s0 abstraction.
183.PP
184Read and write operations on a connect \s-1BIO\s0 will perform I/O
185on the underlying connection. If no connection is established
186and the port and hostname (see below) is set up properly then
187a connection is established first.
188.PP

--- 6 unchanged lines hidden (view full) ---

195Calling \fIBIO_reset()\fR on a connect \s-1BIO\s0 will close any active
196connection and reset the \s-1BIO\s0 into a state where it can connect
197to the same host again.
198.PP
199\&\fIBIO_get_fd()\fR places the underlying socket in \fBc\fR if it is not \s-1NULL\s0,
200it also returns the socket . If \fBc\fR is not \s-1NULL\s0 it should be of
201type (int *).
202.PP
200\&\fIBIO_set_conn_hostname()\fR uses the string \fBname\fR to set the hostname
203\&\fIBIO_set_conn_hostname()\fR uses the string \fBname\fR to set the hostname.
201The hostname can be an \s-1IP\s0 address. The hostname can also include the
202port in the form hostname:port . It is also acceptable to use the
203form \*(L"hostname/any/other/path\*(R" or \*(L"hostname:port/any/other/path\*(R".
204.PP
205\&\fIBIO_set_conn_port()\fR sets the port to \fBport\fR. \fBport\fR can be the
206numerical form or a string such as \*(L"http\*(R". A string will be looked
207up first using \fIgetservbyname()\fR on the host platform but if that
208fails a standard table of port names will be used. Currently the

--- 16 unchanged lines hidden (view full) ---

225\&\fIBIO_get_conn_int_port()\fR returns the port as an int.
226.PP
227\&\fIBIO_set_nbio()\fR sets the non blocking I/O flag to \fBn\fR. If \fBn\fR is
228zero then blocking I/O is set. If \fBn\fR is 1 then non blocking I/O
229is set. Blocking I/O is the default. The call to \fIBIO_set_nbio()\fR
230should be made before the connection is established because
231non blocking I/O is set during the connect process.
232.PP
204The hostname can be an \s-1IP\s0 address. The hostname can also include the
205port in the form hostname:port . It is also acceptable to use the
206form \*(L"hostname/any/other/path\*(R" or \*(L"hostname:port/any/other/path\*(R".
207.PP
208\&\fIBIO_set_conn_port()\fR sets the port to \fBport\fR. \fBport\fR can be the
209numerical form or a string such as \*(L"http\*(R". A string will be looked
210up first using \fIgetservbyname()\fR on the host platform but if that
211fails a standard table of port names will be used. Currently the

--- 16 unchanged lines hidden (view full) ---

228\&\fIBIO_get_conn_int_port()\fR returns the port as an int.
229.PP
230\&\fIBIO_set_nbio()\fR sets the non blocking I/O flag to \fBn\fR. If \fBn\fR is
231zero then blocking I/O is set. If \fBn\fR is 1 then non blocking I/O
232is set. Blocking I/O is the default. The call to \fIBIO_set_nbio()\fR
233should be made before the connection is established because
234non blocking I/O is set during the connect process.
235.PP
236\&\fIBIO_new_connect()\fR combines \fIBIO_new()\fR and \fIBIO_set_conn_hostname()\fR into
237a single call: that is it creates a new connect \s-1BIO\s0 with \fBname\fR.
238.PP
233\&\fIBIO_do_connect()\fR attempts to connect the supplied \s-1BIO\s0. It returns 1
234if the connection was established successfully. A zero or negative
235value is returned if the connection could not be established, the
236call \fIBIO_should_retry()\fR should be used for non blocking connect BIOs
237to determine if the call should be retried.
238.SH "NOTES"
239.IX Header "NOTES"
240If blocking I/O is set then a non positive return value from any

--- 18 unchanged lines hidden (view full) ---

259If non blocking I/O is set then retries will be requested as appropriate.
260.PP
261It addition to \fIBIO_should_read()\fR and \fIBIO_should_write()\fR it is also
262possible for \fIBIO_should_io_special()\fR to be true during the initial
263connection process with the reason \s-1BIO_RR_CONNECT\s0. If this is returned
264then this is an indication that a connection attempt would block,
265the application should then take appropriate action to wait until
266the underlying socket has connected and retry the call.
239\&\fIBIO_do_connect()\fR attempts to connect the supplied \s-1BIO\s0. It returns 1
240if the connection was established successfully. A zero or negative
241value is returned if the connection could not be established, the
242call \fIBIO_should_retry()\fR should be used for non blocking connect BIOs
243to determine if the call should be retried.
244.SH "NOTES"
245.IX Header "NOTES"
246If blocking I/O is set then a non positive return value from any

--- 18 unchanged lines hidden (view full) ---

265If non blocking I/O is set then retries will be requested as appropriate.
266.PP
267It addition to \fIBIO_should_read()\fR and \fIBIO_should_write()\fR it is also
268possible for \fIBIO_should_io_special()\fR to be true during the initial
269connection process with the reason \s-1BIO_RR_CONNECT\s0. If this is returned
270then this is an indication that a connection attempt would block,
271the application should then take appropriate action to wait until
272the underlying socket has connected and retry the call.
273.PP
274\&\fIBIO_set_conn_hostname()\fR, \fIBIO_set_conn_port()\fR, \fIBIO_set_conn_ip()\fR,
275\&\fIBIO_set_conn_int_port()\fR, \fIBIO_get_conn_hostname()\fR, \fIBIO_get_conn_port()\fR,
276\&\fIBIO_get_conn_ip()\fR, \fIBIO_get_conn_int_port()\fR, \fIBIO_set_nbio()\fR and
277\&\fIBIO_do_connect()\fR are macros.
267.SH "RETURN VALUES"
268.IX Header "RETURN VALUES"
269\&\fIBIO_s_connect()\fR returns the connect \s-1BIO\s0 method.
270.PP
271\&\fIBIO_get_fd()\fR returns the socket or \-1 if the \s-1BIO\s0 has not
272been initialized.
273.PP
274\&\fIBIO_set_conn_hostname()\fR, \fIBIO_set_conn_port()\fR, \fIBIO_set_conn_ip()\fR and

--- 47 unchanged lines hidden ---
278.SH "RETURN VALUES"
279.IX Header "RETURN VALUES"
280\&\fIBIO_s_connect()\fR returns the connect \s-1BIO\s0 method.
281.PP
282\&\fIBIO_get_fd()\fR returns the socket or \-1 if the \s-1BIO\s0 has not
283been initialized.
284.PP
285\&\fIBIO_set_conn_hostname()\fR, \fIBIO_set_conn_port()\fR, \fIBIO_set_conn_ip()\fR and

--- 47 unchanged lines hidden ---