[Live-devel] Location of cast used to interface to OpenSSL

Jeff Shanab jshanab at jfs-tech.com
Tue Dec 10 14:54:30 PST 2019


In RTSPClient, Would it be better to have the cast from char* to u_int8_t*
inside the write function, so those operations systems that expect send to
have a char * will not need re-casting?
(If not an alternate solution like typedef SOCKET and DATATYPE in a common
platform header or compiler define.)

Winblows :
WSAAPI
send(
    _In_ SOCKET s,
    _In_reads_bytes_(len) const char FAR * buf,
    _In_ int len,
    _In_ int flags
    );

i.e
int RTSPClient::write(const char* data, unsigned count)
{
      if (fTLS.isNeeded) {
               return fTLS.write((const u_int8_t*)data, count);
      } else {
              return send(fOutputSocketNum, data, count, 0);
      }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20191210/3f10a1be/attachment.htm>


More information about the live-devel mailing list