Portbase User Guide
|
write()- –-- Send a HTML file and others in response to the request from server.
|
read()----Wait until the server requests a sendto.
3) Operation Environment
O/S : Linux or Unix
Tool : Linux or Unix Compiler
4) Result (Active Programming)
If the user designates the IP address of a specific Portbase and starts the program, “This is
LoopBack Data!” is repeatedly transmitted at 3 second intervals and received data will be
displayed on screen.
5) How to Run
Plug the first Portbase serial port to the loopback connector. (The port is connected to socket
4001.)
If you run the program, message “This is LoopBack Data! ” returns and is repeatedly displayed
on screen.
6) Source Code
//Inserts the necessary header files.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/un.h>
#include <string.h>
//Inserts the necessary global variable, and declares the function.
int sock;//Variable for saving the socket handle.
void SendData(void);
void GetData(void);
114
Содержание Portbase-3010
Страница 1: ......
Страница 61: ...Portbase User Guide 4 Click Next 5 Choose destination location and click Next 61 ...
Страница 90: ...Portbase User Guide Log Window 90 ...