mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
merged new xmlrpc-c revision 1472 from https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/trunk
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8545 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
58
libs/xmlrpc-c/lib/abyss/src/socket.h
Normal file
58
libs/xmlrpc-c/lib/abyss/src/socket.h
Normal file
@@ -0,0 +1,58 @@
|
||||
#ifndef SOCKET_H_INCLUDED
|
||||
#define SOCKET_H_INCLUDED
|
||||
|
||||
/*============================================================================
|
||||
This is for backward compatibility. Abyss used to have a socket
|
||||
concept modelled after POSIX sockets, in which a single class (TSocket)
|
||||
contained two very different kinds of objects: some analogous to
|
||||
a TChanSwitch and analogout to a TChannel.
|
||||
|
||||
Now that we have TChanSwitch and TChannel, users should use those,
|
||||
but there may be old programs that use TSocket, and we want them to
|
||||
continue working.
|
||||
|
||||
Actually, this may not be necessary. There was only one release
|
||||
(1.06) that had the TSocket interface, and that release didn't
|
||||
provide any incentive to upgrade an older program to use TSocket,
|
||||
so there may be few or no users of TSocket.
|
||||
============================================================================*/
|
||||
|
||||
#include "xmlrpc-c/abyss.h"
|
||||
|
||||
struct _TSocket {
|
||||
uint signature;
|
||||
/* With both background and foreground use of sockets, and
|
||||
background being both fork and pthread, it is very easy to
|
||||
screw up socket lifetime and try to destroy twice. We use
|
||||
this signature to help catch such bugs.
|
||||
*/
|
||||
|
||||
/* Exactly one of 'chanSwitchP' and 'channelP' is non-null.
|
||||
That's how you know which of the two varieties of socket this is.
|
||||
*/
|
||||
TChanSwitch * chanSwitchP;
|
||||
TChannel * channelP;
|
||||
|
||||
void * channelInfoP; /* Defined only for a channel socket */
|
||||
};
|
||||
|
||||
void
|
||||
SocketCreateChannel(TChannel * const channelP,
|
||||
void * const channelInfoP,
|
||||
TSocket ** const socketPP);
|
||||
|
||||
void
|
||||
SocketCreateChanSwitch(TChanSwitch * const chanSwitchP,
|
||||
TSocket ** const socketPP);
|
||||
|
||||
TChanSwitch *
|
||||
SocketGetChanSwitch(TSocket * const socketP);
|
||||
|
||||
TChannel *
|
||||
SocketGetChannel(TSocket * const socketP);
|
||||
|
||||
void *
|
||||
SocketGetChannelInfo(TSocket * const socketP);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user