home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / programm / 5391 < prev    next >
Encoding:
Text File  |  1992-11-21  |  980 b   |  32 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!usenet.coe.montana.edu!selway.umt.edu!cs000hf
  3. From: cs000hf@selway.umt.edu (Hong Fan)
  4. Subject: how to use setsockopt to reuse local address
  5. Message-ID: <1992Nov21.182210.14986@selway.umt.edu>
  6. Organization: University of Montana
  7. Date: Sat, 21 Nov 1992 18:22:10 GMT
  8. Lines: 22
  9.  
  10.  
  11. Hi, everyone:
  12.  
  13.  
  14. Does anyone know how to use 'setsockopt' to reuse the local address on the 
  15. client site? I want to setup two socket connections as the following
  16. associations.
  17.  
  18.  { tcp, server, 1500, client, 1000 }
  19.  { tcp, server, 1501, client, 1000 }
  20.  
  21. One way I tried is setsockopt(sock,SO_SOCK, SO_REUSEADDR,(char *)&on,sizeof(on))
  22. on the client site after the creation of sock. but it still gave me another
  23. port number. Do I need to setsockopt on the server site?
  24.  
  25. If you know how to solve this problem, please mail me at cs000hf@selway.umt.edu
  26. I appreciate your time and help.
  27.  
  28. sincerely
  29.  
  30. hong fan
  31.  
  32.