Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
SoDispCon.h
Go to the documentation of this file.
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * Barracuda Embedded Web-Server
10 *
11 ****************************************************************************
12 * HEADER
13 *
14 * $Id: SoDispCon.h 6657 2026-10-28 18:19:39Z wini $
15 *
16 * COPYRIGHT: Real Time Logic LLC, 2006 - 2026
17 *
18 * This software is copyrighted by and is the sole property of Real
19 * Time Logic LLC. All rights, title, ownership, or other interests in
20 * the software remain the property of Real Time Logic LLC. This
21 * software may only be used in accordance with the terms and
22 * conditions stipulated in the corresponding license agreement under
23 * which the software has been supplied. Any unauthorized use,
24 * duplication, transmission, distribution, or disclosure of this
25 * software is expressly forbidden.
26 *
27 * This Copyright notice may not be removed or modified without prior
28 * written consent of Real Time Logic LLC.
29 *
30 * Real Time Logic LLC. reserves the right to modify this software
31 * without notice.
32 *
33 * http://www.realtimelogic.com
34 ****************************************************************************
35 *
36 *
37 */
38
41#ifndef __SoDispCon_h
42#define __SoDispCon_h
43
44#include <ThreadLib.h>
45#include <SoDisp.h>
46
47struct SharkSslCon;
48
49/*===========================================================================
50 *
51 * SoDispCon
52 *---------------------------------------------------------------------------
53 */
54
55
56
57/* SoDispCon_ExType -> SoDispCon Execute Type.
58 The callback function SoDispCon_Execute in SoDispCon is
59 like having 6 callback functions. SoDispCon_ExType specifies the
60 current callback type.
61 This construction preserves memory as we have 1 callback function pointer
62 instead of 5.
63
64 ExStateRead: read socket data
65 ExStateWrite: write socket data
66 GetSharkSslCon: return the internal SharkSsslCon object
67 ExStateClose: Close connection.
68 ExStateMoveCon: Moving the active connection to another SoDispCon obj.
69 ExStateDispEv: The socket dispatcher signals that data is ready.
70*/
71typedef enum {
72 SoDispCon_ExTypeRead=1,
73 SoDispCon_ExTypeWrite,
74 SoDispCon_GetSharkSslCon,
75 SoDispCon_ExTypeClose,
76 SoDispCon_ExTypeMoveCon,
77 SoDispCon_ExTypeAllocAsynchBuf,
78 SoDispCon_ExTypeAsyncReady,
79 SoDispCon_ExTypeIdle
80} SoDispCon_ExType;
81
82
83/*
84The arguments to the SoDispCon_Execute callback function:
85 SoDispCon_ExTypeRead:
86 d1 pointer to data, d2 length of data, ret #of bytes read, < 0 if failed
87 or 0 if no data.
88 SoDispCon_ExTypeWrite:
89 d1 pointer to data, d2 length, ret < 0 if failed or #of bytes written.
90 SoDispCon_GetSharkSslCon:
91 d1 is pointer pointer to SharkSslCon, d2 not used, ret TRUE of FALSE.
92 SoDispCon_ExTypeClose:
93 d1 not used, d2 not used, ret is void.
94 SoDispCon_ExTypeMoveCon:
95 d1 is a pointer to a SoDispCon object.
96*/
97
98struct SoDispCon;
99struct SharkSsl;
100
101typedef int (*SoDispCon_Execute)(
102 struct SoDispCon* con, ThreadMutex* m,SoDispCon_ExType s,void* d1,int d2);
103
104
108typedef void (*SoDispCon_DispRecEv)(struct SoDispCon* con);
112typedef void (*SoDispCon_DispSendEv)(struct SoDispCon* con);
113
114
119typedef struct SoDispCon
120{
121#ifdef __cplusplus
122 void *operator new(size_t, void *place) { return place; }
123 void operator delete(void*, void *) { }
126
127
148 int connect(const char* host,
149 U16 port,
150 const void* bindIntfName=0,
151 U16 bindPort=0,
152 U32 timeout=1500,
153 BaBool dgram=false, BaBool ipv6=false,
154 char** errinfo=0);
155
159 bool isSecure();
160
169 bool getSharkSslCon(SharkSslCon** sc);
170
171
175 bool isValid();
176
178 bool isIP6();
179
185 int getPeerName(HttpSockaddr* addr,U16* port=0);
186
192 int getSockName(HttpSockaddr* addr,U16* port=0);
193
202 char* addr2String(HttpSockaddr* addr, char* buf, int len);
203
208 bool cmpAddr(HttpSockaddr* addr2);
209
217 void setTCPNoDelay(bool enable);
218
221 struct SoDisp* getDispatcher();
222
225 bool hasMoreData();
226
229 bool dispatcherHasCon();
230
233 bool recEvActive();
234
237 bool sendEvActive();
238
252 int readData(void* data, int len, bool relmutex=false);
256 int setNonblocking();
259 int setBlocking();
267 int sendData(const void* data, int len);
275 int asyncSend(int len);
281 int sendChunkData(const void* data, int len);
286 int asyncReady();
293 void* allocAsynchBuf(int* size);
294#endif
295 CONNECTION_DISPATCHER_OBJ /*Owned and handled by the SoDisp obj.*/
296
297 /* Owned and handled by SSL. */
298 void* sslData;
299 SoDispCon_Execute exec;
300
301 HttpSocket httpSocket;
302 SoDispCon_DispRecEv dispRecEv;
303 SoDispCon_DispSendEv dispSendEv;
304 struct SoDisp* dispatcher;
305 BaBool* sendTermPtr;
306 BaBool* recTermPtr;
307 U16 rtmo; /* Read timeout in 50 millisec intervals */
308 U8 dataBits;
309 U8 isSending;
311
312#define SoDispCon_socketHasNonBlockDataBitMask 0x01
313#define SoDispCon_hasMoreDataDataBitMask 0x02
314
315#define SoDispCon_dispatcherHasConDataBitMask 0x04
316#define SoDispCon_recEvActiveDataBitMask 0x08
317#define SoDispCon_sendEvActiveDataBitMask 0x10
318#define SoDispCon_isNonBlockingDataBitMask 0x20
319#define SoDispCon_IP6DataBitMask 0x40
320#define SoDispCon_DGramBitMask 0x80
321
322#define SoDispCon_setDispHasRecData(o)\
323 ((o)->dataBits |= \
324 (SoDispCon_hasMoreDataDataBitMask | SoDispCon_socketHasNonBlockDataBitMask))
325#define SoDispCon_setDispatcherHasCon(o)\
326 ((o)->dataBits |= SoDispCon_dispatcherHasConDataBitMask)
327#define SoDispCon_setRecEvActive(o)\
328 ((o)->dataBits |= SoDispCon_recEvActiveDataBitMask)
329#define SoDispCon_setSendEvActive(o)\
330 ((o)->dataBits |= SoDispCon_sendEvActiveDataBitMask)
331#define SoDispCon_setIP6(o)\
332 ((o)->dataBits |= SoDispCon_IP6DataBitMask)
333
334#define SoDispCon_clearSocketHasNonBlockData(o)\
335 ((o)->dataBits &= ~(U8)SoDispCon_socketHasNonBlockDataBitMask)
336#define SoDispCon_clearHasMoreData(o)\
337 ((o)->dataBits &= ~(U8)SoDispCon_hasMoreDataDataBitMask)
338#define SoDispCon_clearDispatcherHasCon(o)\
339 ((o)->dataBits &= ~(U8)SoDispCon_dispatcherHasConDataBitMask)
340#define SoDispCon_setRecEvInactive(o)\
341 ((o)->dataBits &= ~(U8)SoDispCon_recEvActiveDataBitMask)
342#define SoDispCon_setSendEvInactive(o)\
343 ((o)->dataBits &= ~(U8)SoDispCon_sendEvActiveDataBitMask)
344#define SoDispCon_clearIP6(o)\
345 ((o)->dataBits &= ~(U8)SoDispCon_IP6DataBitMask)
346
349#define SoDispCon_socketHasNonBlockData(o)\
350 (((o)->dataBits & SoDispCon_socketHasNonBlockDataBitMask) ? TRUE : FALSE)
353#define SoDispCon_hasMoreData(o)\
354 (((o)->dataBits & SoDispCon_hasMoreDataDataBitMask) ? TRUE : FALSE)
357#define SoDispCon_dispatcherHasCon(o)\
358 (((o)->dataBits & SoDispCon_dispatcherHasConDataBitMask)?TRUE:FALSE)
361#define SoDispCon_recEvActive(o)\
362 (((o)->dataBits & SoDispCon_recEvActiveDataBitMask)?TRUE:FALSE)
365#define SoDispCon_sendEvActive(o)\
366 (((o)->dataBits & SoDispCon_sendEvActiveDataBitMask)?TRUE:FALSE)
369#define SoDispCon_isNonBlocking(o)\
370 (((o)->dataBits & SoDispCon_isNonBlockingDataBitMask) ? TRUE : FALSE)
371#ifndef SoDispCon_isIP6
374#define SoDispCon_isIP6(o)\
375 (((o)->dataBits & SoDispCon_IP6DataBitMask) ? TRUE : FALSE)
378#define SoDispCon_isDGRAM(o) \
379 (((o)->dataBits & SoDispCon_DGramBitMask) ? TRUE : FALSE)
380#endif
385#define SoDispCon_isSecure(o) \
386 ((o)->exec(o,0,SoDispCon_GetSharkSslCon,0,0) > 0)
393#define SoDispCon_getSharkSslCon(o,sharkSslConPtrPtr) \
394 (o)->exec(o,0,SoDispCon_GetSharkSslCon,sharkSslConPtrPtr,0)
397#define SoDispCon_isValid(o) HttpSocket_isValid(&(o)->httpSocket)
398#define SoDispCon_invalidate(o) HttpSocket_invalidate(&(o)->httpSocket)
401#define SoDispCon_getDispatcher(o) (o)->dispatcher
402#define SoDispCon_dispRecEvent(o) (o)->dispRecEv(o)
403#define SoDispCon_dispSendEvent(o) (o)->dispSendEv(o)
407#define SoDispCon_setDispSendEvent(o, dispSendEvFp) \
408 (o)->dispSendEv=dispSendEvFp
409
413#define SoDispCon_setDispRecEvent(o, dispRecEvFp) \
414 (o)->dispRecEv=dispRecEvFp
415
418#define SoDispCon_readData(o, data, len, relmutex) \
419 (o)->exec(o, (relmutex) ? SoDisp_getMutex((o)->dispatcher) : 0, \
420 SoDispCon_ExTypeRead,data,len)
421
422/* The HttpServCon (and classes inherited from HttpServCon) calls the
423 * newConnectionIsReady function after a successful call to
424 * HttpSocket_accept and after the new connection is installed in the
425 * web-server. This is a platform dependent function and is, by default,
426 * disabled as few platforms need this.
427 */
428#ifndef SoDispCon_newConnectionIsReady
429#define SoDispCon_newConnectionIsReady(con)
430#endif
431
440 SoDispCon* o, U8* alertLevel, U8* alertDescription);
441
442#ifdef __cplusplus
443extern "C" {
444#endif
451 SoDispCon* o, struct SoDisp* dispatcher, SoDispCon_DispRecEv e);
452BA_API int SoDispCon_upgrade(SoDispCon* o, struct SharkSsl* ssl,
453 const char* alpn, const char* host, int port);
461BA_API int SoDispCon_blockRead(SoDispCon* o,void* data,int len);
464BA_API int SoDispCon_sendData(SoDispCon* o, const void* data, int len);
471BA_API int SoDispCon_sendDataNT(SoDispCon* o, const void* data, int len);
477BA_API int SoDispCon_sendDataX(SoDispCon* o, const void* data, int len);
480BA_API int SoDispCon_sendChunkData(SoDispCon* o,const void* data, int len);
489#define SoDispCon_asyncReady(o)\
490 (o)->exec(o,0,SoDispCon_ExTypeAsyncReady,0,0)
493#define SoDispCon_asyncSend(o, len) \
494 (o)->exec(o,0,SoDispCon_ExTypeAsyncReady,0,len)
495struct AllocatorIntf;
496
497#ifndef __DOXYGEN__
498typedef struct
499{
500 void* retVal;
501 int size;
502} AllocAsynchBufArgs;
503#endif
504
507BA_API void* SoDispCon_allocAsynchBuf(SoDispCon* o, int* size);
508BA_API void SoDispCon_releaseAsyncBuf(SoDispCon* con);
509BA_API void SoDispCon_internalAllocAsynchBuf(
510 SoDispCon* con, AllocAsynchBufArgs* args);
517BA_API int SoDispCon_peek(SoDispCon* o);
524BA_API int SoDispCon_moveCon(SoDispCon* o, SoDispCon* newCon);
528#define SoDispCon_destructor(o) SoDispCon_zzCloseCon(o,1)
532#define SoDispCon_hardClose(o) SoDispCon_zzCloseCon(o, 2)
536#define SoDispCon_shutdown(o) SoDispCon_zzCloseCon(o, 1)
540#define SoDispCon_closeCon(o) SoDispCon_zzCloseCon(o, 0)
547#define SoDispCon_setReadTmo(o,timeout) (o)->rtmo = (U16)((timeout)/50)
548BA_API void SoDispCon_zzCloseCon(SoDispCon* o, int shutdown);
551BA_API void SoDispCon_setTCPNoDelay(SoDispCon* o, int enable);
554BA_API int SoDispCon_getPeerName(SoDispCon* o,HttpSockaddr* addr,U16* port);
557BA_API int SoDispCon_getSockName(SoDispCon* o, HttpSockaddr* addr, U16* port);
561 SoDispCon* o, HttpSockaddr* addr, char* buf, int len);
564BA_API BaBool SoDispCon_cmpAddr(SoDispCon* o, HttpSockaddr* addr2);
565BA_API void SoDispCon_printSockErr(
566 SoDispCon* o,const char* type,HttpSocket* s,int status);
569#define SoDispCon_getId(o) HttpSocket_getId(&(o)->httpSocket)
570/* Internal */
571#ifndef SoDispCon_platReadData
572int SoDispCon_platReadData(SoDispCon* o, ThreadMutex* m, BaBool* isTerminated,
573 void* data, int len);
574#endif
575
578BA_API int
580 const char* host,
581 U16 port,
582 const void* bindIntfName,
583 U16 bindPort,
584 U32 timeout,
585 BaBool dgram, BaBool ipv6,
586 char** errinfo);
587#if BA_HAVE_SOCKET_WRITE_EVENTS
605BA_API int
606SoDispCon_asyncConnect(SoDispCon* o,
607 const char* host,
608 U16 port,
609 const void* bindIntfName,
610 BaBool ipv6,
611 char** errinfo);
617BA_API int SoDispCon_asyncConnectNext(SoDispCon* o);
618#if BA_USE_GETADDRINFO
623BA_API void SoDispCon_asyncConnectRelease(SoDispCon* o);
624#else
625#define SoDispCon_asyncConnectRelease(o)
626#endif
627
628#endif
629#ifdef __cplusplus
630}
631inline int SoDispCon::readData(void* data, int len, bool relmutex) {
632 return SoDispCon_readData(this, data, len, relmutex ? TRUE : FALSE); }
634 return SoDispCon_setNonblocking(this); }
636 return SoDispCon_setBlocking(this); }
637inline bool SoDispCon::isSecure() {
638 return SoDispCon_isSecure(this) ? true : false; }
639inline bool SoDispCon::getSharkSslCon(SharkSslCon** sc) {
640 return SoDispCon_getSharkSslCon(this,sc) ? true : false; }
641inline bool SoDispCon::isIP6() {
642 return SoDispCon_isIP6(this) ? true : false; }
643inline bool SoDispCon::isValid() {
644 return SoDispCon_isValid(this) ? true : false; }
645inline int SoDispCon::getPeerName(HttpSockaddr* addr,U16* port){
646 return SoDispCon_getPeerName(this,addr,port); }
647inline int SoDispCon::getSockName(HttpSockaddr* addr,U16* port){
648 return SoDispCon_getSockName(this, addr,port); }
649inline char* SoDispCon::addr2String(HttpSockaddr* addr,char* buf,int len){
650 return SoDispCon_addr2String(this, addr, buf, len); }
651inline bool SoDispCon::cmpAddr(HttpSockaddr* addr2) {
652 return SoDispCon_cmpAddr(this, addr2) ? true : false;
653}
654inline void SoDispCon::setTCPNoDelay(bool enable) {
655 SoDispCon_setTCPNoDelay(this, enable); }
657 return SoDispCon_hasMoreData(this) ? true : false;
658}
660 return SoDispCon_dispatcherHasCon(this) ? true : false; }
662 return SoDispCon_recEvActive(this) ? true : false; }
664 return SoDispCon_sendEvActive(this) ? true : false; }
666 return SoDispCon_getDispatcher(this); }
668 SoDispCon_setDispSendEvent(this, ev); }
670 SoDispCon_setDispRecEvent(this, ev); }
671inline int SoDispCon::sendData(const void* data, int len) {
672 return SoDispCon_sendData(this,data, len); }
673inline int SoDispCon::asyncSend(int len) {
674 return SoDispCon_asyncSend(this, len); }
675inline int SoDispCon::sendChunkData(const void* data, int len) {
676 return SoDispCon_sendChunkData(this, data, len); }
678 return SoDispCon_asyncReadyF(this) ? true : false; }
679inline void* SoDispCon::allocAsynchBuf(int* size){
680 return SoDispCon_allocAsynchBuf(this, size); }
681inline int SoDispCon::connect(const char* host,
682 U16 port,
683 const void* bindIntfName,
684 U16 bindPort,
685 U32 timeout,
686 BaBool dgram, BaBool ipv6,
687 char** errinfo) {
688 return SoDispCon_connect(this,host,port, bindIntfName,bindPort,timeout,
689 dgram?TRUE:FALSE, ipv6?TRUE:FALSE,errinfo);
690}
691#endif
692
693
694#endif
BA_API int SoDispCon_setBlocking(SoDispCon *o)
Select blocking socket mode.
#define SoDispCon_setDispRecEvent(o, dispRecEvFp)
Install the receive callback before enabling events.
Definition: SoDispCon.h:413
#define SoDispCon_asyncSend(o, len)
Begin or advance a send from the transport's asynchronous buffer.
Definition: SoDispCon.h:493
BA_API int SoDispCon_sendDataX(SoDispCon *o, const void *data, int len)
Send all bytes without releasing the dispatcher mutex.
BA_API int SoDispCon_blockRead(SoDispCon *o, void *data, int len)
Wait for input using a blocking connection.
#define SoDispCon_setDispSendEvent(o, dispSendEvFp)
Install the send-ready callback before enabling events.
Definition: SoDispCon.h:407
BA_API void SoDispCon_setTCPNoDelay(SoDispCon *o, int enable)
Disable the TCP delay.
#define SoDispCon_readData(o, data, len, relmutex)
Read through the installed transport using its recorded readiness.
Definition: SoDispCon.h:418
BA_API int SoDispCon_sendDataNT(SoDispCon *o, const void *data, int len)
Send all bytes with the sendData contract, but omit body tracing.
BA_API int SoDispCon_sendData(SoDispCon *o, const void *data, int len)
Send an entire buffer through the installed transport.
#define SoDispCon_recEvActive(o)
Definition: SoDispCon.h:361
BA_API int SoDispCon_connect(SoDispCon *o, const char *host, U16 port, const void *bindIntfName, U16 bindPort, U32 timeout, BaBool dgram, BaBool ipv6, char **errinfo)
Connect an initialized, empty connection to a remote endpoint.
BA_API BaBool SoDispCon_cmpAddr(SoDispCon *o, HttpSockaddr *addr2)
Compare an address with the current peer address, ignoring port numbers.
#define SoDispCon_isIP6(o)
Definition: SoDispCon.h:374
void(* SoDispCon_DispSendEv)(struct SoDispCon *con)
Dispatcher send-ready notification, invoked with its mutex held.
Definition: SoDispCon.h:112
void(* SoDispCon_DispRecEv)(struct SoDispCon *con)
Dispatcher receive notification, invoked with its mutex held.
Definition: SoDispCon.h:108
BA_API int SoDispCon_moveCon(SoDispCon *o, SoDispCon *newCon)
Move socket and transport ownership without copying object storage.
BA_API void * SoDispCon_allocAsynchBuf(SoDispCon *o, int *size)
Obtain transport-owned writable storage for asynchronous sending.
BA_API void SoDispCon_constructor(SoDispCon *o, struct SoDisp *dispatcher, SoDispCon_DispRecEv e)
Initialize an empty connection without opening a socket.
#define SoDispCon_hasMoreData(o)
Definition: SoDispCon.h:353
#define SoDispCon_dispatcherHasCon(o)
Definition: SoDispCon.h:357
#define SoDispCon_isSecure(o)
Test a successfully installed transport for TLS.
Definition: SoDispCon.h:385
#define SoDispCon_isValid(o)
Definition: SoDispCon.h:397
BA_API int SoDispCon_getSockName(SoDispCon *o, HttpSockaddr *addr, U16 *port)
Read the local socket endpoint.
BA_API char * SoDispCon_addr2String(SoDispCon *o, HttpSockaddr *addr, char *buf, int len)
Format a numeric address without a port number.
#define SoDispCon_sendEvActive(o)
Definition: SoDispCon.h:365
#define SoDispCon_getSharkSslCon(o, sharkSslConPtrPtr)
Inspect a successfully installed transport.
Definition: SoDispCon.h:393
BA_API int SoDispCon_sendChunkData(SoDispCon *o, const void *data, int len)
Send one HTTP chunk, including its hexadecimal size and CRLF delimiters.
BA_API int SoDispCon_getSharkAlert(SoDispCon *o, U8 *alertLevel, U8 *alertDescription)
Read the current SharkSSL alert fields.
struct SoDispCon SoDispCon
Contains information about the physical socket connection.
BA_API int SoDispCon_asyncReadyF(SoDispCon *o)
Advance asynchronous sending; same status contract as SoDispCon_asyncReady.
BA_API int SoDispCon_getPeerName(SoDispCon *o, HttpSockaddr *addr, U16 *port)
Read the remote peer endpoint.
#define SoDispCon_getDispatcher(o)
Definition: SoDispCon.h:401
BA_API int SoDispCon_setNonblocking(SoDispCon *o)
Select nonblocking socket mode.
uint16_t U16
Unsigned 16-bit integer.
Definition: GenPrimT.h:94
uint32_t U32
Unsigned 32-bit integer.
Definition: GenPrimT.h:96
uint8_t U8
Unsigned 8-bit integer.
Definition: GenPrimT.h:92
U8 BaBool
Boolean stored in an unsigned byte; FALSE is zero and TRUE is one.
Definition: GenPrimT.h:121
Memory allocation and deallocation Interface class.
Definition: AllocatorIntf.h:98
Contains information about the physical socket connection.
Definition: SoDispCon.h:120
int connect(const char *host, U16 port, const void *bindIntfName=0, U16 bindPort=0, U32 timeout=1500, BaBool dgram=false, BaBool ipv6=false, char **errinfo=0)
Connect an initialized, empty connection to a remote endpoint.
Definition: SoDispCon.h:681
int setBlocking()
Select blocking socket mode.
Definition: SoDispCon.h:635
struct SoDisp * getDispatcher()
Definition: SoDispCon.h:665
int asyncSend(int len)
Begin or advance a send from the transport's asynchronous buffer.
Definition: SoDispCon.h:673
SoDispCon()
Uninitialized storage; call SoDispCon_constructor before use.
Definition: SoDispCon.h:125
bool isIP6()
Definition: SoDispCon.h:641
bool isValid()
Definition: SoDispCon.h:643
bool isSecure()
Deprecated: Use getSharkSslCon(NULL).
Definition: SoDispCon.h:637
int sendChunkData(const void *data, int len)
Send one HTTP chunk, including its hexadecimal size and CRLF delimiters.
Definition: SoDispCon.h:675
bool sendEvActive()
Definition: SoDispCon.h:663
void setDispRecEvent(SoDispCon_DispRecEv ev)
Install a receive callback before enabling receive events.
Definition: SoDispCon.h:669
char * addr2String(HttpSockaddr *addr, char *buf, int len)
Format a numeric address without a port number.
Definition: SoDispCon.h:649
bool cmpAddr(HttpSockaddr *addr2)
Compare an address with the current peer address, ignoring port numbers.
Definition: SoDispCon.h:651
bool getSharkSslCon(SharkSslCon **sc)
Inspect a connected transport's TLS implementation.
Definition: SoDispCon.h:639
void setTCPNoDelay(bool enable)
Disable the TCP delay.
Definition: SoDispCon.h:654
bool hasMoreData()
Definition: SoDispCon.h:656
void * allocAsynchBuf(int *size)
Obtain transport-owned writable storage for asynchronous sending.
Definition: SoDispCon.h:679
int asyncReady()
Advance pending output and inspect completion.
Definition: SoDispCon.h:677
int readData(void *data, int len, bool relmutex=false)
Read through the installed transport using its recorded readiness.
Definition: SoDispCon.h:631
bool recEvActive()
Definition: SoDispCon.h:661
int sendData(const void *data, int len)
Send an entire buffer through the installed transport.
Definition: SoDispCon.h:671
int getSockName(HttpSockaddr *addr, U16 *port=0)
Read the local socket endpoint.
Definition: SoDispCon.h:647
void setDispSendEvent(SoDispCon_DispSendEv ev)
Install a send-ready callback before enabling send events.
Definition: SoDispCon.h:667
int setNonblocking()
Select nonblocking socket mode.
Definition: SoDispCon.h:633
bool dispatcherHasCon()
Definition: SoDispCon.h:659
int getPeerName(HttpSockaddr *addr, U16 *port=0)
Read the remote peer endpoint.
Definition: SoDispCon.h:645
The SoDisp dispatches any socket connection that contains data by calling the SoDispCon::execute memb...
Definition: SoDisp.h:97
A mutual exclusion class.
Definition: ThreadLib.h:196