(CONNECTED_CODER_FORMAT_VERSION): New macro.

([ConnectedEncoder
-_initForWritingWithConnection:sequenceNumber:identifier:]): Get
packetClass from the connection's outPort, not the outPortClass.
Return self.
([ConnectedDecoder
+readSignatureFromCStream:getClassname:formatVersion:]): Fill in name
and version.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1056 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-03-06 13:54:21 +00:00
parent bfeb6dcb3b
commit 0944e0909c

View file

@ -35,6 +35,8 @@
#define DEFAULT_SIZE 256
#define CONNECTED_CODER_FORMAT_VERSION 0
static BOOL debug_connected_coder = NO;
@implementation ConnectedEncoder
@ -48,7 +50,7 @@ static BOOL debug_connected_coder = NO;
sequenceNumber: (int)n
identifier: (int)i
{
Packet* packet = [[[[c portClass] packetClass] alloc]
Packet* packet = [[[[c outPort] packetClass] alloc]
initForSendingWithCapacity: DEFAULT_SIZE
replyPort: [c inPort]];
[super initForWritingToStream: packet];
@ -61,6 +63,7 @@ static BOOL debug_connected_coder = NO;
[self encodeValueOfCType: @encode(typeof(identifier))
at: &identifier
withName: @"ConnectedCoder sequence number"];
return self;
}
+ newForWritingWithConnection: (Connection*)c
@ -136,9 +139,12 @@ static BOOL debug_connected_coder = NO;
getClassname: (char *) name
formatVersion: (int*) version
{
return;
const char *classname = class_get_class_name (self);
strcpy (name, classname);
*version = CONNECTED_CODER_FORMAT_VERSION;
}
+ newDecodingWithConnection: (Connection*)c
timeout: (int) timeout
{