Skip to content

Replace ssize_t by size_t#2340

Merged
eboasson merged 8 commits intoeclipse-cyclonedds:masterfrom
eboasson:replace-ssize-t-by-size-t
Feb 3, 2026
Merged

Replace ssize_t by size_t#2340
eboasson merged 8 commits intoeclipse-cyclonedds:masterfrom
eboasson:replace-ssize-t-by-size-t

Conversation

@eboasson
Copy link
Contributor

This includes #2336
This is an alternative to #2339

Building the Iceoryx plugin on Windows fails because Iceoryx brings a different definition of ssize_t. ssize_t is somewhat of an abomination in the type system (although an understandable and pragmatic choice), and in some ways the code gets cleaner by rewriting to return the number of bytes read/written in a size_t output parameter with a dds_return_t return value.

The trouble is that it has a bit of impact. Hence the alternative of introduce a type ddsrt_ssize_t to avoid the collision. I'm inviting other people's opinion before deciding which way to go ...

Signed-off-by: Erik Boasson <eb@ilities.com>
No TCP server socket was created if the configured TCP port number is 0, instead of one
listening on a random port number.

Signed-off-by: Erik Boasson <eb@ilities.com>
Signed-off-by: Erik Boasson <eb@ilities.com>
Signed-off-by: Erik Boasson <eb@ilities.com>
We don't allocate server port numbers like we do with UDP, so adding them makes no sense.

Signed-off-by: Erik Boasson <eb@ilities.com>
Signed-off-by: Erik Boasson <eb@ilities.com>
There are a number of problems with the TCP implementation that are caused by a bad
design. The problems are various:

* ownership of connections
* handling of disconnects
* potential blocking at bad times

fixing the requires a wholesale rewrite. It does work reasonably well in somewhat benign
settings, and it has on occasion helped save the day. Disabling by default minimises the
risk while retaining something that people may have been using.

Signed-off-by: Erik Boasson <eb@ilities.com>
@eboasson eboasson force-pushed the replace-ssize-t-by-size-t branch from fb05422 to eb343ec Compare February 2, 2026 16:23
@eboasson eboasson merged commit d6db00d into eclipse-cyclonedds:master Feb 3, 2026
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant