Skip to content

Commit 0ad1bb8

Browse files
Merge pull request #1454 from isuruh15/isolated-fix
Make TCP Client functions isolated
2 parents 481f9f9 + 8230eab commit 0ad1bb8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ballerina/client.bal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public isolated client class Client {
3838
#
3939
# + data - The data that need to be sent to the connected remote host
4040
# + return - `()` or else a `tcp:Error` if the given data cannot be sent
41-
remote function writeBytes(byte[] data) returns Error? = @java:Method {
41+
isolated remote function writeBytes(byte[] data) returns Error? = @java:Method {
4242
name: "externWriteBytes",
4343
'class: "io.ballerina.stdlib.tcp.nativeclient.Client"
4444
} external;
@@ -51,7 +51,7 @@ public isolated client class Client {
5151
# ```
5252
#
5353
# + return - The `readonly & byte[]` or else a `tcp:Error` if the data cannot be read from the remote host
54-
remote function readBytes() returns (readonly & byte[])|Error = @java:Method {
54+
isolated remote function readBytes() returns (readonly & byte[])|Error = @java:Method {
5555
name: "externReadBytes",
5656
'class: "io.ballerina.stdlib.tcp.nativeclient.Client"
5757
} external;

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ This file contains all the notable changes done to the Ballerina TCP package thr
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6+
## Unreleased
7+
8+
### Changed
9+
- [Mark `writeBytes` and `readBytes` methods in the client as `isolated`](https://github.com/ballerina-platform/ballerina-library/issues/7609)
10+
611
## [1.12.1] - 2025-02-11
712

813
### Fixed

0 commit comments

Comments
 (0)