🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.transputer
1 messages
1 total messages Started by Scott Ralph Thu, 08 Nov 1990 18:33
Help with Nsend()
#1089
Author: Scott Ralph
Date: Thu, 08 Nov 1990 18:33
59 lines
2214 bytes
I am having trouble using nrecv() when the data field
becomes larger than 4096 bytes -- the maximum number of
bytes for a single message.

        extern int errno;
        struct nmsg header;

        HostMessage host_message;

        typedef Message *MessagePtr;

        typedef struct hMsg {
           unsigned char sending_processor;
           unsigned char rows;
           unsigned char cols;
           unsigned char type;
           unsigned char generation;
           char    data [NUMBER_PIXELS_IN_REGION];
        } HostMessage;

        typedef HostMessage *HostMessagePtr;

    header.nh_event = 0;
    header.nh_type = 0;
    header.nh_length = sizeof (HostMessage);
    header.nh_flags = 0;
    header.nh_msg = (char *) &host_message;

    if ( nrecv (&header)) {
        printf("Death # 1 -- %d\n", errno);
        fflush(stdout);
        kexit (errno);*
    }


The nrecv() returns with errno #4 -- EINTR
This corresponds to an interrupted system call.


NSEND(l)            TROLLIUS NETWORK LIBRARY             NSEND(l)
     The nh_length field holds the length (in bytes) of the  mes-
     sage  to  be  sent.   If the sender and the receiver specify
     different lengths, the lesser amount  will  be  transferred.
     The  datalink  functions called by nsend have a maximum mes-
     sage length of MAXNMSGLEN (defined in  <trillium/net.h>  and
     currently  set  to  4096  bytes).   Messages  exceeding this
     length will be implicitly  broken  down  into  a  series  of
     smaller  messages, which will be recombined at the receiving
     end.

-------------


I am not sure if additional information must be specified (i.e.
the nh_flags field?) or not.

Any Suggestions?

-- scott ralph
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads