Changed the meaning of the second parameter in AttachString(): it's now the maximum

length, not the length of the string.
Introduced a maximal string length that may be sent at once.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14799 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-11-09 18:28:13 +00:00
parent 88ccb61ad5
commit f46e077c5f
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ class LinkSender {
status_t Flush(bigtime_t timeout = B_INFINITE_TIMEOUT, bool needsReply = false);
status_t Attach(const void *data, size_t size);
status_t AttachString(const char *string, int32 length = -1);
status_t AttachString(const char *string, int32 maxLength = -1);
template <class Type> status_t Attach(const Type& data)
{
return Attach(&data, sizeof(Type));