Changeset 873:b3a37e089ed9 in roaraudio for libroar/socket.c
- Timestamp:
- 10/03/08 13:02:03 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/socket.c
r840 r873 109 109 } 110 110 111 int roar_socket_decnet_set_timeout (int fh, time_t sec, int usec) { 112 #ifdef ROAR_HAVE_LIBDNET 113 struct timeval timeout = {sec, usec}; 114 115 return setsockopt(fh, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)); 116 #else 117 return -1; 118 #endif 119 } 120 111 121 int roar_socket_new_decnet_seqpacket (void) { 112 122 #ifdef ROAR_HAVE_LIBDNET … … 115 125 fh = socket(AF_DECnet, SOCK_SEQPACKET, DNPROTO_NSP); 116 126 127 roar_socket_decnet_set_timeout(fh, 300, 0); 128 117 129 return fh; 118 130 #else … … 127 139 128 140 fh = socket(AF_DECnet, SOCK_STREAM, DNPROTO_NSP); 141 142 roar_socket_decnet_set_timeout(fh, 300, 0); 129 143 130 144 return fh;
Note: See TracChangeset
for help on using the changeset viewer.