SCOUG-Programming Mailing List Archives
Return to [ 06 | 
June | 
2001 ]
 >> Next Message >>
 
 
 
Content Type:   text/plain 
I'm working with Rexx sockets.  
 
Here's some code (it's complete, you can run it as a .cmd) which gives  
me an error.  Why does SockBind() return the error?  
 
/* SockBind() test. */  
call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'  
call SysLoadFuncs  
call RxFuncAdd 'SockLoadFuncs','RxSock','SockLoadFuncs'  
call SockLoadFuncs 'q'  
socknum=SockSocket('AF_INET','SOCK_STREAM',0)  
SAY "socknum="socknum  
host.!addr='INADDR_ANY' /* all local IP's */  
host.!port=25 /* SMTP port */  
host.!family='AF_INET'  
rval=SockBind(socknum,'host.!')  
SAY "rval="rval  
 
When I run it, the screen display shows:  
 
  socknum=1002  
  rval=-1  
 
- Peter  
 
 
 
=====================================================  
 
To unsubscribe from this list, send an email message  
to "steward@scoug.com". In the body of the message,  
put the command "unsubscribe scoug-programming".  
 
For problems, contact the list owner at  
"rollin@scoug.com".  
 
=====================================================  
 
  
 >> Next Message >>
Return to [ 06 | 
June | 
2001 ] 
  
  
The Southern California OS/2 User Group
 P.O. Box 26904
 Santa Ana, CA  92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group.  ALL RIGHTS 
RESERVED. 
 
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International 
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
 
 |