Annotation of libwww/Library/src/HTMuxCh.html, revision 2.4
2.1 frystyk 1: <HTML>
2: <HEAD>
2.2 frystyk 3: <TITLE>W3C Sample Code Library libwww MUX Protocol</TITLE>
2.1 frystyk 4: </HEAD>
5: <BODY>
6: <H1>
7: The MUX Protocol
8: </H1>
9: <PRE>
10: /*
11: ** (c) COPYRIGHT MIT 1995.
12: ** Please first read the full copyright statement in the file COPYRIGH.
13: */
14: </PRE>
15: <P>
16: This module defines the read and write functions to and from the network.
17: As we are having reentrant function and a smarter network I/O this will get
18: very small :-)
19: <P>
20: This module is implemented by <A HREF="HTMux.c">HTMux.c</A>, and it is a
2.3 frystyk 21: part of the <A HREF="http://www.w3.org/Library/"> W3C Sample Code
2.1 frystyk 22: Library</A>.
23: <PRE>
24: #ifndef HTMUXCHANNEL_H
25: #define HTMUXCHANNEL_H
26:
27: typedef struct _HTMuxChannel HTMuxChannel;
28: typedef struct _HTMuxSession HTMuxSession;
29: typedef struct _HTMuxProtocol HTMuxProtocol;
30:
31: typedef unsigned char HTMuxSessionId;
32:
33: #include "HTMuxHeader.h"
34: #include "HTChannl.h"
35: #include "HTHost.h"
36:
37: #define INVSID 0 /* Invalid session id */
38: #define INVPID 0 /* Invalid protocol id */
39: </PRE>
40: <H2>
41: Mux Channel
42: </H2>
43: <PRE>
44: extern HTMuxChannel * HTMuxChannel_new (HTHost * host);
45:
46: extern HTMuxChannel * HTMuxChannel_find (HTHost * host);
47:
48: extern BOOL HTMuxChannel_delete (HTMuxChannel * me);
49:
50: extern BOOL HTMuxChannel_deleteAll (void);
51:
52: extern HTNet * HTMuxChannel_net (HTMuxChannel * me);
53:
54: extern HTMuxSession * HTMuxChannel_findSession (HTMuxChannel * me, HTMuxSessionId sid);
55:
56: extern HTMuxSession * HTMuxChannel_findSessionFromNet (HTMuxChannel * me,
57: HTNet * net);
58:
59: extern HTHost * HTMuxChannel_host (HTMuxChannel * muxch);
60:
61: extern int HTMuxChannel_sendControl (HTMuxChannel * muxch, HTMuxSessionId sid,
62: HTMuxHeader opcode, int value,
63: const void * param, int param_size);
64:
65: </PRE>
66: <H2>
67: Mux Session
68: </H2>
69: <PRE>
70: typedef enum _HTMuxClose {
71: MUX_S_END_READ = 0x1,
72: MUX_S_END_WRITE = 0x2,
73: MUX_S_END = 0x3
74: } HTMuxClose;
75:
76: extern HTMuxSessionId HTMuxSession_accept (HTMuxChannel * muxch, HTNet * net,
77: HTProtocolId pid);
78:
79: extern HTMuxSessionId HTMuxSession_connect (HTMuxChannel * muxch, HTNet * net,
80: HTProtocolId pid);
81:
82: extern int HTMuxSession_close (HTMuxChannel * muxch, HTMuxSessionId sid);
83:
84: extern HTMuxSession * HTMuxSession_register (HTMuxChannel * muxch,
85: HTMuxSessionId sid,
86: HTProtocolId pid);
87:
88: extern HTMuxSessionId HTMuxSession_id (HTMuxSession * session);
89:
90: extern HTProtocolId HTMuxSession_pid (HTMuxSession * session);
91:
92: extern HTNet * HTMuxSession_net (HTMuxSession * session);
93:
94: extern BOOL HTMuxSession_setClose (HTMuxChannel * muxch,
95: HTMuxSession * session, HTMuxClose close);
96:
97: extern int HTMuxSession_credit (HTMuxSession * session);
98:
99: extern BOOL HTMuxSession_setCredit (HTMuxChannel * muxch,
100: HTMuxSessionId sid, int credit);
101:
102: extern int HTMuxSession_fragment (HTMuxSession * session);
103:
104: extern BOOL HTMuxSession_setFragment (HTMuxChannel * muxch,
105: HTMuxSessionId sid, int fragment);
2.4 ! kahan 106:
! 107: estern int HTMuxSession_disposeData (HTMuxSession * me,
! 108: const char * buf, int len);
2.1 frystyk 109: </PRE>
110: <H2>
111: Mux Protocol
112: </H2>
113: <PRE>
114: extern BOOL HTMuxProtocol_add (HTMuxChannel * muxch,
115: HTProtocolId pid, const char * protocol);
116:
117: extern BOOL HTMuxProtocol_delete (HTMuxChannel * muxch, HTProtocolId pid);
118: </PRE>
119: <PRE>
120: #endif
121: </PRE>
122: <P>
123: <HR>
124: <ADDRESS>
2.4 ! kahan 125: @(#) $Id: HTMuxCh.html,v 2.3 1998/05/14 02:10:47 frystyk Exp $
2.1 frystyk 126: </ADDRESS>
127: </BODY></HTML>
Webmaster