"Roy Keene" 151119990202 rkeene@suspend.net \ "Model for Distributed Computing Library as implemented by me." \ "Work in Progress" " This document is designed for me to collect my thoughts, if it makes no sense to you, its probably not your fault. Library should include functions to int distlib_calc (int operand1, int operand2, unsigned char operation, int times, int priority); int distlib_calc (float operand1, float operand2, unsigned char operation, int times, int priority); send message to SERVER [size of message (4bytes)][TypeID=1,2 (1byte)][priority (1byte)][operand1][operand2][operation] To be replied with its TaskID (not to be confused with TypeID above) TaskID is 2bytes in size Where operation is 1 = Add (operand1 + operand2) 2 = Subtract (operand1 - operand2) 3 = Multiply (operand1 * operand2) 4 = Divide (operand1 / operand2) 5 = Modulous (operand1 % operand2) 6 = Raise to power (operand1 ^ operand2) 7 = X root distlib_msg *distlib_getallmsg (void); Gets all messages currently being sent to this host. Returns an array of distlib_msg: [size of message][taskId][retcode (2bytes)][data] distlib_msg distlib_getmsg (int taskid, int blocking); Get a message for a specific taskId, NULL if no results or bad taskId if blocking==1, wait until message is recieved (NULL for bad taskId, still) int distlib_exec (char path[127], char *args[128], int priority); Returns taskId [size of message][typeID=3][priority][path][args] Server functions: |