#include <connection.h>
Public Member Functions | |
| void | Connect (unsigned int port, const char *host) |
| makes a socket connection for the specified network. | |
| void | Disconnect () |
| closes the socket connection. | |
| void | Send (const char *buf, size_t numbytes) |
| publishes the data to the network. | |
| size_t | Receive (char *buf, size_t numbytes) |
| allocates buf with size numbytes. | |
| void Connection::Connect | ( | unsigned int | port, | |
| const char * | host | |||
| ) |
makes a socket connection for the specified network.
| port | the serial port for the connection's network host. | |
| host | the name of the network host. |
| void Connection::Disconnect | ( | ) |
closes the socket connection.
| void Connection::Send | ( | const char * | buf, | |
| size_t | numbytes | |||
| ) |
publishes the data to the network.
| buf | the buffer to be written to with network bytes. | |
| numbytes | the number of bytes contained in the the buffer. |
| size_t Connection::Receive | ( | char * | buf, | |
| size_t | numbytes | |||
| ) |
allocates buf with size numbytes.
| buf | the buffer to be written to with network bytes | |
| numbytes | the maximum index used for the buffer (buf) |