Search Results

Search found 1 results on 1 pages for 'user338159'.

Page 1/1 | 1 

  • sendto is returning ENOBUF

    - by user338159
    Hi, I am currently running an old system on Tru64 which involves lots of UDP sockets using the sendto() function. The sockets are used in our code to send messages to/from various processes and then eventually on to a thick client app that is connected remotely. Occasionally the socket to the thick client gets stuck, this can cause some of these messages to get built up. My question is how can I determine the current buffer size, and how do I determine the maximum message buffer. The code below gives a snippet of how I set up the port and use the sendto function. /* need to adjust the maximum size we can send on this / / as it needs to be able to cope with the biggest / / messages we send / lenlen = sizeof(len) ; / allow double for when the system is under load */ len = 2 * C_MAX_MESSAGE_DATA_SIZE ; lpos_setsockopt(FATAL, msg_socket,SOL_SOCKET, SO_SNDBUF, &len, lenlen, &error_no) ; result = sendto( msg_socket, (char *)message, (int)message_len, flags, dest_addr, addrlen); Note. We have ported this application to Linux and the problem does not seem to appear there. Any help would be greatly appreciated. Regards

    Read the article

1