Fix incorrect argument type for JsonRpc::SendMessage

This commit is contained in:
Gunnar Beutner 2018-03-06 08:54:47 +01:00
parent 9b72a6c2f3
commit b172a67867
3 changed files with 3 additions and 2 deletions

View File

@ -40,6 +40,7 @@
#endif /* __MINGW32__ */
typedef int socklen_t;
typedef SSIZE_T ssize_t;
#define MAXPATHLEN MAX_PATH

View File

@ -72,7 +72,7 @@ size_t JsonRpc::SendMessage(const Stream::Ptr& stream, const Dictionary::Ptr& me
return NetString::WriteStringToStream(stream, json);
}
StreamReadStatus JsonRpc::ReadMessage(const Stream::Ptr& stream, String *message, StreamReadContext& src, bool may_wait, size_t maxMessageLength)
StreamReadStatus JsonRpc::ReadMessage(const Stream::Ptr& stream, String *message, StreamReadContext& src, bool may_wait, ssize_t maxMessageLength)
{
String jsonString;
StreamReadStatus srs = NetString::ReadStringFromStream(stream, &jsonString, src, may_wait, maxMessageLength);

View File

@ -36,7 +36,7 @@ class JsonRpc
{
public:
static size_t SendMessage(const Stream::Ptr& stream, const Dictionary::Ptr& message);
static StreamReadStatus ReadMessage(const Stream::Ptr& stream, String *message, StreamReadContext& src, bool may_wait = false, size_t maxMessageLength = -1);
static StreamReadStatus ReadMessage(const Stream::Ptr& stream, String *message, StreamReadContext& src, bool may_wait = false, ssize_t maxMessageLength = -1);
static Dictionary::Ptr DecodeMessage(const String& message);
private: