summaryrefslogtreecommitdiffstats
path: root/runtime/netstrm.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/netstrm.h')
-rw-r--r--runtime/netstrm.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/runtime/netstrm.h b/runtime/netstrm.h
index 75b7c457..f4205f80 100644
--- a/runtime/netstrm.h
+++ b/runtime/netstrm.h
@@ -29,9 +29,10 @@
/* the netstrm object */
struct netstrm_s {
BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */
- nsd_if_t Drvr; /**< our stream driver */
- nsd_t *pDrvrData; /**< the driver's data elements */
+ nsd_t *pDrvrData; /**< the driver's data elements (at most other places, this is called pNsd) */
uchar *pDrvrName; /**< nsd driver name to use, or NULL if system default */
+ nsd_if_t Drvr; /**< our stream driver */
+ netstrms_t *pNS; /**< pointer to our netstream subsystem object */
};
@@ -41,11 +42,19 @@ BEGINinterface(netstrm) /* name must also be changed in ENDinterface macro! */
rsRetVal (*ConstructFinalize)(netstrm_t *pThis);
rsRetVal (*Destruct)(netstrm_t **ppThis);
rsRetVal (*AbortDestruct)(netstrm_t **ppThis);
- rsRetVal (*LstnInit)(netstrm_t *pThis, unsigned char *pLstnPort);
- rsRetVal (*AcceptConnReq)(netstrm_t **ppThis, int sock);
+ rsRetVal (*LstnInit)(netstrms_t *pNS, void *pUsr, rsRetVal(*)(void*,netstrm_t*),
+ uchar *pLstnPort, uchar *pLstnIP, int iSessMax);
+ rsRetVal (*AcceptConnReq)(netstrm_t *pThis, netstrm_t **ppNew);
rsRetVal (*Rcv)(netstrm_t *pThis, uchar *pRcvBuf, ssize_t *pLenBuf);
rsRetVal (*Send)(netstrm_t *pThis, uchar *pBuf, ssize_t *pLenBuf);
rsRetVal (*Connect)(netstrm_t *pThis, int family, unsigned char *port, unsigned char *host);
+ //rsRetVal (*SelectInit)(nsdsel_t **ppSel, netstrm_t *pThis);
+ //rsRetVal (*SelectAdd)(nsdsel_t *pSel, netstrm_t *pThis);
+ //rsRetVal (*SelectWait)(nsdsel_t *pSel, int *piNumReady);
+ //rsRetVal (*SelectIsReady)(nsdsel_t *pSel, int *piNumReady);
+ //rsRetVal (*SelectExit)(nsdsel_t **ppSel);
+ rsRetVal (*GetRemoteHName)(netstrm_t *pThis, uchar **pszName);
+ rsRetVal (*GetRemoteIP)(netstrm_t *pThis, uchar **pszIP);
ENDinterface(netstrm)
#define netstrmCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */