home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / vmsnet / networks / tcpip / multinet / 2069 < prev    next >
Encoding:
Text File  |  1992-08-30  |  2.1 KB  |  58 lines

  1. X-Gateway-Source-Info: INTERNET
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!ames!network.ucsd.edu!mvb.saic.com!tgv.com!info-multinet
  3. Date: 31 AUG 92 03:02:57 GMT
  4. Newsgroups: vmsnet.networks.tcp-ip.multinet
  5. X-Return-path: <info-multinet-relay@TGV.COM>
  6. X-RFC822-From:     adelman (Kenneth Adelman) @ TGV.COM
  7. From: adelman@TGV.COM
  8. Subject:  Re: Do UCX and Multinet support nonblocking I/O?
  9. Organization: The INFO-MULTINET Community
  10. Message-ID: <2460095431AUG92030257@TGV.COM>
  11. Nntp-Posting-Host: Mvb.Saic.Com
  12. Lines: 44
  13.  
  14. > I want to port to VMS a Unix program which initiates several
  15. > connections to TCP servers and uses nonblocking I/O
  16. > to manage all the connections simultaneously.
  17.  
  18. > Questions:
  19. > 1) Will a program written for one style of TCP/IP (UCX, Multinet, CMU/TEK)
  20. >    run or compile for another style of TCP/IP, or are they wildly incompatible?
  21.  
  22.     Mildly incompatible.  For the most part each vendor implements a
  23. 4.3bsd socket library, but has changed the names of the routines in
  24. different ways so as to not conflict with the VAX C routines like
  25. "read()".
  26.  
  27.     You should also be able to take images COMPILED for UCX and run
  28. them over MultiNet with no problem using our UCX emulation.
  29.  
  30. > 2) Can select() or poll() be used with tcp/ip sockets to detect which of a
  31. >    set of sockets is ready for I/O?
  32.  
  33.     MultiNet provides a select(); note however that our select() can
  34. only be used on network sockets (and not, for example, terminals).
  35.  
  36. > 3) Can one use non-blocking I/O on a socket?    If so, how?
  37. >    In UNIX, one does the following:
  38.  
  39. >      fd = socket(hp->h_addrtype, SOCK_STREAM, 0);
  40. >      /* Use non-blocking I/O on this socket */
  41. > #if USE_FIONBIO      /* some unix systems use ioctl to set nonblocking...*/
  42. >      ioctl(fd, FIONBIO, (char *)&state);
  43. > #else              /* others use fcntl() */
  44. >      flags = fcntl(fd, F_GETFL, 0);
  45. >      flags |= FNDELAY;
  46. >      fcntl(fd, F_SETFL, &flags);
  47. > #endif
  48. >      /* Start connecting to the host.  May get EINPROGRESS. */
  49. >      err = connect(fd, (struct sockaddr *)&sin, sizeof(sin));
  50.  
  51. > Will this work under VMS with UCX (or Multinet, or...)?
  52.  
  53.     With Multinet, yes, with UCX I'm not sure. The FIONBIO ioctl()
  54. is provided, fnctl() is not.
  55.  
  56.                                 Ken
  57. 
  58.