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

Network Stream Device Driver

Virtual TCP socket stream device. More...

Functions

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

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


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 stream device from a specified socket.

Parameters:
sock   Socket descriptor. This pointer must have been retrieved by calling NutTcpCreateSocket(). In addition a connection must have been established by calling NutTcpConnect or NutTcpAccept.
Examples:
httpd/nutmain.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/nutmain.c, portdio/portdio.c, and tcps/tcps.c.


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