Loadable Function: tcpserver = tcpserver (ipaddress, port)
Loadable Function: tcpserver = tcpserver (port)
Loadable Function: tcpserver = tcpserver (…, [propertyname, propertyvalue])

Open tcpserver interface.

Inputs

ipaddress - the ip address of type String.
port - the port number to bind.
propname,propvalue - property name/value pairs.

Known input properties:

Name

name value

Timeout

Numeric timeout value or -1 to wait forever

UserData

User data value.

Outputs

The tcpserver() shall return instance of octave_tcpserver class as the result tcpserver.

Properties

The tcpserver object has the following public properties:

Connected

boolean flag for when connected to a client (Readonly)

ClientPort

connected client port number (Readonly)

ClientAddress

connected client address (Readonly)

Name

name assigned to the tcpserver object

Type

instrument type ’tcpserver’ (readonly)

ServerPort

server port number (Readonly)

ServerAddress

server address (Readonly)

Status

status of the object ’open’ or ’closed’ (readonly)

Timeout

timeout value in seconds used for waiting for data

NumBytesAvailable

number of bytes currently available to read (readonly)

NumBytesWritten

number of bytes currently available to read (readonly)

ByteOrder

Byte order for data (currently not used)

Terminator

Terminator value used for string data (currently not used)

UserData

User data

Package: instrument-control