|
From: Ned K. <ne...@us...> - 2004-03-30 22:38:19
|
Update of /cvsroot/squeak/squeak/platforms/Cross/plugins/SpreadPlugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11319/platforms/Cross/plugins/SpreadPlugin Added Files: Tag: ned-branch SpreadPlugin.h Log Message: Automake 1.7 compatibility changes. Added plugins: - BerkeleyDbPlugin (Stephen Pair) - FT2Plugin (Arjen van Elteren, mods by Ned Konz) - SpreadPlugin (Ned Konz) Added diagnostics and aioDisable for invalid sockets in sqUnixSocket.c --- NEW FILE: SpreadPlugin.h --- /* Spread Plugin common functions */ /* Spread header */ #include <sp.h> struct SpreadConnection { int mbox; int semaIndex; int sessionID; }; typedef struct SpreadConnection SpreadConnection; typedef char groups_name[MAX_GROUP_NAME]; typedef char const cgroups_name[MAX_GROUP_NAME]; int sqSpreadInit(void); int sqSpreadShutdown(void); /* all of the following functions return 0 on success, or error code on failure */ /* returns error code, fills in s and groupBuf */ int sqSpreadConnect(SpreadConnection *s, /*OUT*/ const char *daemonName, int daemonNameSize, const char *privateName, int privateNameSize, int wantsGroupMsgs, char groupBuf[MAX_GROUP_NAME], /*OUT*/ int semaIndex); /* returns error code */ int sqSpreadDisconnect(SpreadConnection * s); /* returns msg length (0..n) or error code (<0) */ int sqSpreadReceive(SpreadConnection const * s, int *serviceType, /*OUT*/ char *sender, /*OUT*/ int maxGroups, int *numberOfGroups, /*OUT*/ char *groups, /*OUT*//* numberOfGroups*MAX_GROUP_NAME long */ int16 *messageType, /*OUT*/ int *endianMismatch, /*OUT*/ int messageLength, char *message, /*OUT*/ int drop); int sqSpreadError(int n); /* returns number of bytes sent or error code (<0) */ /* service_type is one of: UNRELIABLE_MESS RELIABLE_MESS FIFO_MESS CAUSAL_MESS AGREED_MESS SAFE_MESS possibly or'd with SELF_DISCARD if desired. */ int sqSpreadMultigroupMulticast(SpreadConnection const *s, int service_type, int num_groups, char const *groups, int mess_type, int mess_len, char const *mess); /* return error (<0), nothing (0), or bytes available (>0) */ int sqSpreadPoll(SpreadConnection const *s); /* return 0 on success, or error (<0) */ int sqSpreadJoin(SpreadConnection const *s, char const* group, int groupLength); /* return 0 on success, or error (<0) */ int sqSpreadLeave(SpreadConnection const *s, char const* group, int groupLength); /* return 1 if connection is still valid */ int sqSpreadIsValid(SpreadConnection const *s); |