Milky Way
                              image  MultiverseSocial.com Milky Way
                              image
> Web 4 <
BaseChannel.c

            
 
All extending Channels MUST have the Channel structure their base.
ie: the first element of any  extending structure called "base".
This is an "extended" channel because you extend the base channel struct.

struct SomeFancyNewChannel
{
struct Channel base; // must have.
};

  //
  //  Optional.  point  these if you want
  //
void (*open ) (void *);
void (*init ) (void *);
void (*pause) (void *);
void (*run  ) (void *);
void (*close) (void *);
void (*signal)(void *);

struct Channel
{
struct Linkable         node;
int                            channel_flags;
int                            type;
int                            io_flags;
struct SignalGroup ch_signalgroup;
struct Signal           ch_signal; 
int                           pid;
char                       *name;
void (*open ) (void *);
void (*init ) (void *);
void (*pause) (void *);
void (*run  ) (void *);
void (*close) (void *);
void (*signal)(void *);
struct Linkable IOBase;         
struct Signal  io_external_signal     [IO_THREAD_NUMBER];
struct HyperLinkedList io_listt         [IO_THREAD_NUMBER];
struct NetXecThread    io_thread    [IO_THREAD_NUMBER];
void                  *io_lock                   [IO_THREAD_NUMBER];
struct   RunInfo       thread_runinfo [IO_THREAD_NUMBER];
};

int ChannelNameMatch(char *);
struct RunInfo *SynchRunInfo(void);
int SynchChannels(struct Channel *,struct Channel *);
int LinkChannel(struct Channel *,struct Channel *);
int UnLink(struct Channel *,struct Channel *);
void CloseChannel(struct Channel *tChannelPtr)
struct Channel *LinkRunInfo(struct Channel *tLinkChannel)
int LinkChannel(struct Channel *tChannel1,struct Channel *tChannel2)
void ChannelMenu(void);
   //menu FTM stdin.
fprintf(stdout,"1) New   Channel\r\n");
fprintf(stdout,"2) Get   Channel\r\n");
fprintf(stdout,"3) join  Channel\r\n");
fprintf(stdout,"4) Leave Channel\r\n");
fprintf(stdout,"5) IO configuration\r\n");
fprintf(stdout,"6) Thread control\r\n");
fprintf(stdout,"7) Channel Registry\r\n");

 
 
 
Something I haven't thought of goes here ;)


 





-->