Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

Network Stream Device Driver
[Network device drivers.]

Virtual TCP socket stream device. More...

Functions

NUTDEVICENutSoStreamCreate (TCPSOCKET *sock)
 Create a virtual stream device from a specified socket.

int NutSoStreamDestroy (NUTDEVICE *dev)
 Destroy a previously created stream device.


Detailed Description

Virtual TCP socket stream device.

This driver does not control a real device. It can be created from an established TCP socket connection. The purpose of this driver is to enable applications to use advanced stream I/O functions on TCP sockets.


Function Documentation

NUTDEVICE* NutSoStreamCreate TCPSOCKET   sock
 

Create a virtual stream device from a specified socket.

Parameters:
sock  Specifies the socket descriptor, which must have been retrieved by calling NutTcpCreateSocket(). In addition a connection must already have been established by calling NutTcpConnect() or NutTcpAccept().
Examples:
httpd/httpserv.c, inetq/inetq.c, portdio/portdio.c, and tcps/tcps.c.

int NutSoStreamDestroy NUTDEVICE   dev
 

Destroy a previously created stream device.

This will flush the stream output buffer and release any occupied memory. To terminate the connection and close the socket, the application must call NutTcpCloseSocket().

Parameters:
dev  Identifies the stream device, which has been created previously by calling NutSoStreamCreate().
Examples:
httpd/httpserv.c, inetq/inetq.c, portdio/portdio.c, and tcps/tcps.c.


© 2000-2002 by egnite Software GmbH - visit http://www.ethernut.de/