Index of /download/eloq/beta/B0710/netdll
Name Last modified Size
Parent Directory -
README 2006-09-12 15:09 3.3K
XE71-060912-hpux-pa11.tar.gz 2006-09-12 15:09 54K
XE71-060912-hpux-pa20.tar.gz 2006-09-12 15:09 55K
XE71-060912-hpux-ia64.tar.gz 2006-09-12 15:09 64K
XE71-060912-linux-glibc2.2.tar.gz 2006-09-12 15:09 68K
net.DLL - Simple Eloquence DLL interface to network services
Revision: 12.09.2006
----------------------------------------------------------------------
Installation
============
The file Net.DLL for the platform should be should be installed
in directory /opt/eloquence6/dll. Permissions should be set to 555.
cd hpux10 (or linux-glibc2.1 or linux-glibc2.2)
cp Net.DLL /opt/eloquence6/dll/
chmod 555 /opt/eloquence6/dll/Net.DLL
chown root:root /opt/eloquence6/dll/Net.DLL
Programming interface
=====================
The Net.DLL implements the following calls.
For a sample program please refer to DEMO.PROG
CALL DLL Net("dll_Revision", Rev$)
returns DLL revision string ("1.1").
CALL DLL Net("dll_Compiled", Date$)
returns DLL compile date ("Wed May 2 14:50:04 CEST 2001").
CALL DLL Net("dll_Debug", 1)
Enable/disable internal EQ DLL debugging.
CALL DLL Net("dll_LogFile", "/tmp/net.log")
Open log file (in append mode). Any previous log file is
closed. If the file name is empty, disable log file usage.
Errors: 2001
CALL DLL Net("dll_Log", Str$)
Write string to log file
CALL DLL Net("Connect", Server$,Service$)
Connect to TCP server at specified port
Errors: 2002, 2003, 2004, 2005
CALL DLL Net("ConnectUDP", Server$,Service$[,Source$])
Connect to UDP server at specified port.
Source$ can be used to specify the source port.
Errors: 2002, 2003, 2004, 2005
CALL DLL Net("Disconnect")
Disconnect from server
Errors: 2006, 2007
CALL DLL Net("Listen", Service$)
Establish a TCP listen queue on specified port
Errors: 2002, 2003, 2011
CALL DLL Net("CloseListen")
Close the listen queue
Errors: 2006, 2007
CALL DLL Net("Accept", Peer_addr$,Peer_port)
Accept a new connection from the TCP listen queue
Errors: 18, 2002, 2006, 2012
CALL DLL Net("Select", Status,Timeout)
Check if data is available or new connections are pending.
Status bit 0 is set if data is available.
Status bit 1 is set if new connections are pending.
Status bit 2 is set if a timeout has occurred.
If timeout is zero, block until condition is met.
If timeout is nonzero, block until condition is met or
the specified number of milliseconds have elapsed.
If timeout is -1 then set Status and return immediately.
Errors: 2006, 2013
CALL DLL Net("Send", Buf$)
Send data to server
Errors: 2006
CALL DLL Net("Recv", Buf$, Cnt, Timeout)
Read cnt bytes from server. An empty buffer is returned
if an EOF condition has been encountered.
If timeout is zero, block until data is available.
If timeout is nonzero, block until data is available or
the specified number of milliseconds have elapsed.
If timeout is -1 or used with UDP protocol then read all
data (up to cnt bytes) which are available immediately
without blocking.
If a timeout is encountered, an error 2010 is returned.
Errors: 18, 2006, 2009, 2010
Eloquence errors:
18 - receive buffer is too small
2001 - log file cannot be opened
2002 - already conected
2003 - bad service name or port number
2004 - bad host name or ip address
2005 - unable to connect
2006 - not connected
2007 - disconnect failed
2008 - send failed
2009 - receive failed
2010 - receive timed out
2011 - listen failed
2012 - accept failed
2013 - select failed