Salad  1.0.15
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Sld_network

Functions

SLD_SSINT sld_network_connect (char *host, SLD_USINT port)
 Connects to a destination host on the specified port. More...
 
SLD_SSINT sld_network_disconnect ()
 Terminates a connection. More...
 
SLD_ULINT sld_network_receive ()
 Receives data from a network connection. More...
 
SLD_ULINT sld_network_send (char *packet)
 Sends data to a destination host. More...
 

Detailed Description

Note
The sld_network functions are not yet implemented!
Todo:

Implement sld_network functionality!

This module contains functions related to networking.

Function Documentation

SLD_SSINT sld_network_connect ( char *  host,
SLD_USINT  port 
)

Connects to a destination host on the specified port.

Parameters
hostthe destination hostname
portthe destination port number
Returns
Success or failure
sld_network_connect("localhost", 23);
SLD_SSINT sld_network_disconnect ( )

Terminates a connection.

Returns
Success or failure
SLD_ULINT sld_network_receive ( )

Receives data from a network connection.

Returns
Size of data received in bytes
printf("%lu bytes were received.\n", sld_network_receive());
SLD_ULINT sld_network_send ( char *  packet)

Sends data to a destination host.

Parameters
packetbytes to send
Returns
Size of data sent in bytes
printf("%lu bytes were sent.\n", sld_network_send(data));