× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Straight off of Scott's website. I can't remember if this is from the first 
sample sockets program or one of the later ones there, but I think it's the 
same prototype regardless:
 ** --------------------------------------------------------------------   
 **   connect() -- Connect to a host.                                      
 **                                                                        
 **      int connect(int socket_descriptor,                                
 **                  struct sockaddr *destination,                         
 **                  int address_length)                                   
 **                                                                        
 **      Used to connect to a host.  (Usually used on the client-side)     
 **      In TCP applications, this takes an address & port and connects    
 **      to a server program thats listening on that port.   In UDP        
 **      this simply specifies the address & port to send to.              
 **                                                                        
 ** --------------------------------------------------------------------   
 D connect         PR            10I 0 ExtProc('connect')                  
 D   Sock_Desc                   10I 0 VALUE                               
 D   p_SockAddr                    *   VALUE                               
 D   AddressLen                  10I 0 VALUE                               

 D Retn            S             10i 0                                          
                                      
                                                                           
And the code itself...

                                                                        
 C                   Eval      Retn = connect(sock: p_connto: addrlen)  
 C                   if        Retn <  0                                
 c                   callp     close(sock)                              
 C                   Eval      *Inlr = *On                              
 C                   Return                                             
 C                   Endif                                              
  *                                                                     


brian <bsl04@xxxxxxxx> wrote: Please show your prototype for connect. Maybe the 
return value is of the
wrong type or something.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.