rkent@sparc1.sparc1.csubak.edu (Rick Kent) (05/12/91)
Has anyone tried programming some client/server programs to utilize DNET? I'm attempting to write a graphical, window-based, mouse-driven bulletin board system that will use DNET as the underlying communication protocol. The only problem is that some of the functions are missing from Matt's original code. I've been trying to write these routines based soley on what I believe they're supposed to do, but so far haven't had much luck. The missing functions include the following: BCmp(), WaitMsg(), BMov(), GetHead(), GetDEnv(), etc. The WaitMsg() function is the one giving me the trouble right now. If anyone else has attempted to write any DNET clients or servers, then they will have to have rewritten these missing functions. I've asked Matt if there is perhaps a new version coming soon, but it appears that it may be about 6 months before he has the time to revise it and he no longer has these missing routines. He's real busy right now with Amiga UUCP. If anybody has coded up or has a copy of these missing routines, I could sure use them! -- Rick Kent // Only California State University, Bakersfield \X/ Amiga! Internet: rkent@sparc1.csubak.edu AOL: RickK10
dillon@overload.Berkeley.CA.US (Matthew Dillon) (05/13/91)
In article <1991May11.140241.626@nic.csu.net> rkent@sparc1.sparc1.csubak.edu (Rick Kent) writes: >Has anyone tried programming some client/server programs to utilize >DNET? I'm attempting to write a graphical, window-based, mouse-driven >bulletin board system that will use DNET as the underlying communication >protocol. The only problem is that some of the functions are missing >from Matt's original code. I've been trying to write these routines >based soley on what I believe they're supposed to do, but so far haven't >had much luck. The missing functions include the following: > > BCmp(), WaitMsg(), BMov(), GetHead(), GetDEnv(), etc. > >The WaitMsg() function is the one giving me the trouble right now. If >anyone else has attempted to write any DNET clients or servers, then >they will have to have rewritten these missing functions. I've asked >Matt if there is perhaps a new version coming soon, but it appears that >it may be about 6 months before he has the time to revise it and he no >longer has these missing routines. He's real busy right now with Amiga >UUCP. If anybody has coded up or has a copy of these missing routines, >I could sure use them! > >-- >Rick Kent // Only >California State University, Bakersfield \X/ Amiga! >Internet: rkent@sparc1.csubak.edu >AOL: RickK10 Here's WaitMsg() .. .this works for messages passed between tasks which is all DNet does. To make it work w/ messages passed from interrupts you have to use Disable()/Enable(). -Matt #include <exec/types.h> #include <exec/ports.h> #include <clib/exec_protos.h> #include <stdio.h> typedef struct Message Message; typedef struct MsgPort MsgPort; void WaitMsg(Message *); void WaitMsg(msg) Message *msg; { while (msg->mn_Node.ln_Type != NT_REPLYMSG) Wait(1 << msg->mn_ReplyPort->mp_SigBit); Forbid(); Remove(&msg->mn_Node); Permit(); } -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA
rkent@sparc1.sparc1.csubak.edu (Rick Kent) (05/14/91)
In article <dillon.7623@overload.Berkeley.CA.US> dillon@overload.Berkeley.CA.US (Matthew Dillon) writes: > > Here's WaitMsg() .. .this works for messages passed between tasks > which is all DNet does. To make it work w/ messages passed from > interrupts you have to use Disable()/Enable(). > > -Matt > Thanks for the code Matt! I've got things working now. ///Rick/// -- Rick Kent // Only California State University, Bakersfield \X/ Amiga! Internet: rkent@sparc1.csubak.edu AOL: RickK10