Dear user of, we will have a scheduled downtime for FTP

at July, 22nd from 7am approx. till 4pm

BREXX, MySQL Database Functions
Previous Top Index Next

Unix Functions

The following routines are available when importing the library with CALL import "".


change current directory to dir and return the current working directory
say chdir()
call chdir "/home"


Prepares a TCP/IP socket connection for listening on port. Returns the socket descriptor id.
id = listen(1234)

RECV(fd [,length])

Receives data through TCP/IP from socket descriptor fd of length length. If length is not specified then it returns all available data from the socket.
say recv(fd)
say recv(fd,10) /* return 10 bytes */

SEND(fd, data)

Sends the data to socket fd. It returns the number
say send(fd,"Hello world")

SLEEP(time [,"U","S","M","H","D"])

Call the system sleep function for a period of time with units:
Usmicro seconds
call sleep 5 /* sleep 5s */
call sleep 1000,'u' /* sleep 1ms */


return the socket descriptor after opening the TCP/IP port on host for communication. -1 on error
fd = socket('localhost',1234)
fd = socket('',5678)


close socket fd
call socketclose fd

Previous Top Index Next