Information Technology Reference
In-Depth Information
receive window, send window, connection state;
number of buffers awaiting acknowledgement, number of buffers pending receipt;
urgent state, precedence, security/compartment;
transmission timeout.
24.8.6 ABORT
The ABORT call causes all pending SENDs and RECEIVEs to be aborted. All TCBs are
also removed and a RESET message sent to the other TCP. The basic parameters passed and
returned from the call are given next. Parameters in brackets are optional.
Parameters passed:
local connection name
24.9 WinSock
24.9.1 Introduction
The Windows sockets specification describes a common interface for networked Windows
programs. WinSock uses TCP/IP communications and provides for binary and source code
compatibility for different network types.
The Windows sockets API (WinSock application programming interface or WSA) is a
library of functions that implement the socket interface by the Berkley Software distribution
of UNIX. WinSock augments the Berkley socket implementation by adding Windows-
specific extensions to support the message-driven nature of Windows system.
The basic implementation normally involves:
Opening a socket - this allows for multiple connections with multiple hosts. Each socket
has a unique identifier. It normally involves defining the protocol suite, the socket type
and the protocol name. The API call used for this is socket() .
Naming a socket - this involves assigning location and identity attributes to a socket. The
API call used for this is bind() .
Associate with another socket - this involves either listening for a connection or actively
seeking a connection. The API calls used in this are listen() , connect() and ac-
cept() .
Send and receive between sockets - the API calls used in this are send() , sendto() ,
recv() and recvfrom() .
Close the socket - the API calls used in this are close() and shutdown() .
24.9.2 Windows sockets
The main WinSock API calls are:
socket()
Creates a socket.
accept()
Accepts a connection on a socket.
connect()
Establishes a connection to a peer.
bind()
Associates a local address with a socket.
listen()
Establishes a socket to listen for incoming connection.
Search WWH ::




Custom Search