Which API should be used?

There are 3 different APIs provided as standard with the FarSync X.25 software for use on Windows, plus an API provided by a 3rd Party (the Ascert X.25 Library for Java). In addition, a further API is available via the FarSync TCP-X25 Gateway. It is important to select the most appropriate API for the particular requirement, in order to put design and development efforts to best use.


WinSock2 X.25 API

The FarSync sockets API conforms to the WinSock2 transport provider model, and can be used by any programming language capable of using Windows sockets.

It is the preferred API for developers implementing in C and C++. It can be used via the System.Net.Sockets classes by C# and Visual Basic programs using Microsoft .NET Framework - additional classes (X25Socket and X25EndPoint) are provided to make this easier.

Using the X.25 sockets API is much like writing a sockets application for TCP/IP, except that a different address family is used, and data transfer is packetised (rather than stream-based).

As well as providing an API to X.25, the WinSock API also supports applications wishing to interface to the ISO 8073 Transport protocol.

Follow this hyperlink for information on Installing the FarSync X.25 Sockets API.


NCB API

The native programming interface to the FarSync X.25 product is via a C function-call to the ASFNB.DLL library, and is thus suitable to those programs that are developed in C or C++, or other languages capable of calling C functions (such as Delphi).

This API is very powerful, allowing direct control of the operation of X.25 layer 3. The relative complexity of the NCB API is such, however, that new developers are advised to use the WinSock API instead.

Follow this hyperlink for information on Installing the Developer Resources for the Standard X.25 API.


Java X.25 API

None of the standard FarSync X.25 APIs support Java, so it's necessary to use the Ascert X.25 Library for Java. This provides a common API for Java applications to control and communicate with remote applications over X.25 connections which is not specific to FarSync X.25 cards.

The Java API is located in the \Windows\Develop\Java\ folder on the CD-ROM.

Follow this hyperlink for full details on the Java API.


TCP interface using the FarSync TCP-X.25 Gateway

The FarSync TCP-X.25 Gateway allows multiple applications to access the X.25 line using standard TCP sockets (for example WinSock2). The Gateway is configurable as to how connections are routed, and how the data is handled (the format of messages of the X.25 connection may need to be different to the format over the TCP connection.)

The TCP Gateway interface allows the X.25 line to be accessed either on the local PC or remotely. It is suitable for handling large number of simultaneous connections, either SVCs or PVCs. It allows control over the X.25 call parameters for outgoing calls, and provides explicit message delimitation, but otherwise doesn’t provide particularly close control over the X.25 interface.

The FarSync TCP-X.25 Gateway is a separately purchasable item - refer to the FarSite web-site at www.farsite.com for further details.


API Features Matrix

Feature

NCB API

WinSock2 API

Java API

Gateway API

ANSI C Yes Yes No Yes
C++ Yes Yes No Yes
C# (.NET) No Yes No Yes
Java No No Yes Yes
Delphi Yes Yes No Yes
Visual Basic Not directly Suitable for VB .NET No Yes
Control of X.25 packetisation Yes Yes Yes Yes
Character Stream Yes Yes Yes Yes
Access X.25 facilities Yes Yes Yes Partial
Close control of X.25 layer 3 Yes Yes Yes No
Permanent Virtual Circuits (PVCs) Yes Yes Yes Yes
Large numbers of virtual connections Yes Yes Yes Yes
High performance Yes Yes Yes Yes
Remote access No No No Yes
32-bit Applications on x64 Yes Yes n/a Yes
64-bit Applications on x64 No Future Release n/a Yes