Agilent Technologies E4406A VSA manual Using a Java Applet Over Socket LAN

Models: E4406A VSA

1 406
Download 406 pages 63.49 Kb
Page 104
Image 104
Using a Java™ Applet Over Socket LAN

Programming Fundamentals

Using the LAN to Control the Analyzer

Using a Java™ Applet Over Socket LAN

The example program “Using Java Programming Over Socket LAN” on page 171 demonstrates simple socket programming with Java. It is written in Java programming language, and will compile with Java compilers versions 1.0 and above.

This program is on your documentation CD ROM that shipped with the product.

Using a C Program Over Socket LAN

The example programs “Using C Programming Over Socket LAN” on page 148 and “Using C Programming Over Socket LAN (Windows NT)” on page 168 demonstrate simple socket programming. They are written in C, and compile in the HP-UX UNIX environment or the WIN32 environment.

In UNIX, LAN communication via sockets is very similar to reading or writing a file. The only difference is the openSocket() routine, which uses a few network library routines to create the TCP/IP network connection. Once this connection is created, the standard fread() and fwrite() routines are used for network communication.

In Windows, the routines send() and recv() must be used, since fread() and fwrite() may not work on sockets.

104

Chapter 2

Page 104
Image 104
Agilent Technologies E4406A VSA manual Using a Java Applet Over Socket LAN, Using a C Program Over Socket LAN