-int syncWrite(int fd, char *ptr, ssize_t size, int timeout) {
+/* Write the specified payload to 'fd'. If writing the whole payload will be done
+ * within 'timeout' milliseconds the operation succeeds and 'size' is returned.
+ * Otherwise the operation fails, -1 is returned, and an unspecified partial write
+ * could be performed against the file descriptor. */
+ssize_t syncWrite(int fd, char *ptr, ssize_t size, long long timeout) {