1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 22:06:39 +02:00
Files
anope/include/uplink.h
T
Adam 595dad4ec1 Update copyright to 2014. This was done with:
find include/ src/ lang/ docs/ modules/ *.* Config -exec sed -i 's/-20.. Anope Team/-2014 Anope Team/i' {} \;
2014-01-01 20:48:38 -05:00

55 lines
1022 B
C++

/*
*
* (C) 2003-2014 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
*/
#ifndef UPLINK_H
#define UPLINK_H
#include "sockets.h"
#include "protocol.h"
namespace Uplink
{
extern void Connect();
}
/* This is the socket to our uplink */
class UplinkSocket : public ConnectionSocket, public BufferedSocket
{
public:
UplinkSocket();
~UplinkSocket();
bool ProcessRead() anope_override;
void OnConnect() anope_override;
void OnError(const Anope::string &) anope_override;
/* A message sent over the uplink socket */
class CoreExport Message
{
MessageSource source;
std::stringstream buffer;
public:
Message();
Message(const MessageSource &);
~Message();
template<typename T> Message &operator<<(const T &val)
{
this->buffer << val;
return *this;
}
};
};
extern CoreExport UplinkSocket *UplinkSock;
#endif // UPLINK_H