Browse Source

* Corrected connect call

michael 26 years ago
parent
commit
54aeca17c7
1 changed files with 5 additions and 4 deletions
  1. 5 4
      docs/sockets.tex

+ 5 - 4
docs/sockets.tex

@@ -213,7 +213,7 @@ Errors are those of the regular \seef{Bind} command.
 \end{functionl}
 \end{functionl}
 \begin{function}{Connect}
 \begin{function}{Connect}
 \Declaration
 \Declaration
-Function Connect (Sock:Longint;Var Addr;Addrlen:Longint) : Boolean;
+Function Connect (Sock:Longint;Var Addr;Addrlen:Longint) : Longint;
 
 
 \Description
 \Description
 \var{Connect} opens a connection to a peer, whose address is described by
 \var{Connect} opens a connection to a peer, whose address is described by
@@ -221,6 +221,8 @@ var{Addr}. \var{AddrLen} contains the length of the address.
 The type of \var{Addr} depends on the kind of connection you're trying to
 The type of \var{Addr} depends on the kind of connection you're trying to
 make, but is generally one of \var{TSockAddr} or \var{TUnixSockAddr}.
 make, but is generally one of \var{TSockAddr} or \var{TUnixSockAddr}.
 
 
+The \var{Connect} functions returns a file descriptor if the call
+was successfull, a negative value in case of error.
 \Errors
 \Errors
 Errors are reported in \var{SocketError}.
 Errors are reported in \var{SocketError}.
 \SeeAlso
 \SeeAlso
@@ -234,9 +236,8 @@ Function Connect (Sock:longint;const addr:string;var SockIn,SockOut:text) : Bool
 
 
 \Description
 \Description
  This is an alternate form of the \seef{Connect} command. 
  This is an alternate form of the \seef{Connect} command. 
-It is equivalent
-to subsequently calling the regular \seef{Connect} function and the 
-\seep{Sock2Text} function.
+It is equivalent to subsequently calling the regular \seef{Connect} 
+function and the  \seep{Sock2Text} function.
 The function returns \var{True} if successfull, \var{False} otherwise.
 The function returns \var{True} if successfull, \var{False} otherwise.
 
 
 \Errors
 \Errors