Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ read(wdd) — DECnet WAN Support 3.0A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

socket(2w)

bind(2w)

getsockopt(2w)

setsockopt(2w)

send(2w)

write(2w)

close(2w)

fcntl(2)

sigvec(2)

read(wdd)

NAME

read − Receive data from the WDD Line

SYNTAX

 
#include <sys/types.h>
#include <sys/socket.h>

cc =read (s, buf, buflen)
int cc,s;
char ∗buf;
int buflen;

DESCRIPTION

The client uses the read() or recv() system calls to receive data from the line.
 

ARGUMENTS

Input Arguments

s Value returned by the socket() system call

buf Pointer to the buffer into which the data will be placed

buflen Length of the receive buffer, i.e. maximum number of characters to be received

RETURN VALUE

If the read is successful, the return value ( cc ) is the number of characters actually read.  Otherwise, -1 is returned and the global variable errno is set to indicate the error.

DIAGNOSTICS

[EBADF] Invalid socket descriptor. 

[EFAULT] The specified buffer points outside the allocated address space. 

[EWOULDBLOCK] The socket is marked "non-blocking" and there was no data immediately available. 

[EINTR] The read() operation was interrupted by a signal, possibly an indication that the Modem Connect Line has been disabled, or some other event has occurred on the line.

SEE ALSO

socket(2w), bind(2w), getsockopt(2w), setsockopt(2w), send(2w), write(2w), close(2w), fcntl(2), sigvec(2). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026