Process class requires an output buffer #32

Closed
opened 2018-08-07 02:10:49 +00:00 by jamie · 5 comments
jamie commented 2018-08-07 02:10:49 +00:00 (Migrated from git.hazaar.io)

So I keep getting these socket_write() errors (broken pipe). While "broken pipe" normally means that the socket is being closed by the other end, I think that may not always be the case. Anywayz, as it turns out I need to handle partial output with socket_write, which I am not currently doing. This may alleviate some issues.

So, the lass itself should have an output buffer. socket_write() will return how many bytes it actually wrote. If that is less than the size of the output buffer then we need to truncate the output buffer with substr() and try again in the future to send the rest.

So I keep getting these `socket_write()` errors (broken pipe). While "broken pipe" normally means that the socket is being closed by the other end, I think that may not always be the case. Anywayz, as it turns out I need to handle partial output with socket_write, which I am not currently doing. This may alleviate some issues. So, the lass itself should have an output buffer. `socket_write()` will return how many bytes it actually wrote. If that is less than the size of the output buffer then we need to truncate the output buffer with `substr()` and try again in the future to send the rest.
jamie commented 2018-08-07 10:37:10 +00:00 (Migrated from git.hazaar.io)
created branch [`32-process-class-requires-an-output-buffer`](https://git.hazaarlabs.com/hazaar/hazaar-warlock/compare/master...32-process-class-requires-an-output-buffer)
jamie commented 2018-08-07 10:37:12 +00:00 (Migrated from git.hazaar.io)

mentioned in merge request !10

mentioned in merge request !10
jamie commented 2018-08-07 11:32:48 +00:00 (Migrated from git.hazaar.io)

closed via commit 0e88a616ef

closed via commit 0e88a616ef50d15d096ff3d01e63623d17932d02
jamie commented 2018-08-07 11:32:48 +00:00 (Migrated from git.hazaar.io)

closed via merge request !10

closed via merge request !10
jamie commented 2018-08-07 11:33:42 +00:00 (Migrated from git.hazaar.io)

Added the output buffer easily enough. Then while testing this, I discovered that the frame buffer and payload buffer in the server client class was not doing what it was supposed to do so I have fixed this at the same time.

Added the output buffer easily enough. Then while testing this, I discovered that the frame buffer and payload buffer in the server client class was not doing what it was supposed to do so I have fixed this at the same time.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/hazaar-warlock#32
No description provided.