Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) 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.
This mailing list archive is Copyright 1997-2026 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.