jtcp(actionStr,vara​rgin)

Sends/receives TCP packets using Matlab's Java interface. Now handles matrices and cell arrays, etc.

Download
Download

You are now following this Submission

Cite As

Kevin Bartlett (2026). jtcp(actionStr,varargin) (https://ch.mathworks.com/matlabcentral/fileexchange/24524-jtcp-actionstr-varargin), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.12.0

Modified to allow timeout of zero (i.e., an infinite timeout). This will cause Matlab to hang until the connection is made, so the user must also specify a value of true for the new optional parameter 'acceptZeroTimeouts'.

Download
1.11.0

Added workaround for outOfMemoryError to program description.

Download
1.10.0

Now issues meaningful error message when an attempt is made to send non-int8 data with serialization set to false.

Download
1.9.0

Removed reference to older version of jtcp.m (no longer included in zip file) from description.

Download
1.8.0

Incorporates code from the earlier, int8-only version of jtcp.m to make data serialization optional. This allows jtcp.m to communicate with programs/hardware that do not themselves implement serialization.

Download
1.7.0

Re-wrote Java code to permit reading and writing of cell arrays, matrices, strings, etc. (previous version limited to type "int8").

Download
1.6.0

Switched to sending/receiving messages of "int8" format, rather than strings. Enabled optional use of Rodney Thomson's DataReader java class for more efficient reading of incoming data.

Download
1.5.0

Enabled call to error() if user inputs a value of mssg that is not a string.

Download
1.4.0

Implemented suggestion from Derek Eggiman to replace while loop with built-in java socket timeout feature.

Download
1.1.0

Call to serverSocket.close added in try/catch statement in order to fix bug, spotted by Jayson Brouchoud, that caused port to hang after an "accept" timed out.

Download
1.0.0

Download