Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ write(wdd) — DECnet WAN Support 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

socket(2w)

bind(2w)

getsockopt(2w)

setsockopt(2w)

close(2w)

read(2w)

recv(2w)

write(wdd)

NAME

write − Transmit data over the WDD Line

SYNTAX

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

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

DESCRIPTION

When the bind() system call has been successfully executed, the client can transmit data over the line by issuing the write() or send() system call.

ARGUMENTS

Input Arguments

s value returned by the socket() system call

buf specifies the pointer to the data to be sent

buflen specifies the length of the data buffer

RETURN VALUE

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

DIANOSTICS

[EBADF] Invalid socket descriptor. 

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

[EMSGSIZE] Data packet is too large. 

[ENODEV] A successful bind() has not been made by this socket.

[EACCES] The caller is not the owner of the line. 

[ENOBUFS] No memory available or output queue is full.

[ESHUTDOWN] Line shutdown due to modem signal failure. 

[ENETDOWN] The line is not yet available for transmission or has been disabled by Network Management. 

[EWOULDBLOCK] The socket is marked "non-blocking" and the process would be delayed in the write operation. 

[EINTR] The write() 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), close(2w), read(2w), recv(2w), fcntl, sigvec. 

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