mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
(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:
parent
f26a2609fe
commit
2aea66d1cb
1 changed files with 8 additions and 2 deletions
|
@ -35,6 +35,8 @@
|
||||||
|
|
||||||
#define DEFAULT_SIZE 256
|
#define DEFAULT_SIZE 256
|
||||||
|
|
||||||
|
#define CONNECTED_CODER_FORMAT_VERSION 0
|
||||||
|
|
||||||
static BOOL debug_connected_coder = NO;
|
static BOOL debug_connected_coder = NO;
|
||||||
|
|
||||||
@implementation ConnectedEncoder
|
@implementation ConnectedEncoder
|
||||||
|
@ -48,7 +50,7 @@ static BOOL debug_connected_coder = NO;
|
||||||
sequenceNumber: (int)n
|
sequenceNumber: (int)n
|
||||||
identifier: (int)i
|
identifier: (int)i
|
||||||
{
|
{
|
||||||
Packet* packet = [[[[c portClass] packetClass] alloc]
|
Packet* packet = [[[[c outPort] packetClass] alloc]
|
||||||
initForSendingWithCapacity: DEFAULT_SIZE
|
initForSendingWithCapacity: DEFAULT_SIZE
|
||||||
replyPort: [c inPort]];
|
replyPort: [c inPort]];
|
||||||
[super initForWritingToStream: packet];
|
[super initForWritingToStream: packet];
|
||||||
|
@ -61,6 +63,7 @@ static BOOL debug_connected_coder = NO;
|
||||||
[self encodeValueOfCType: @encode(typeof(identifier))
|
[self encodeValueOfCType: @encode(typeof(identifier))
|
||||||
at: &identifier
|
at: &identifier
|
||||||
withName: @"ConnectedCoder sequence number"];
|
withName: @"ConnectedCoder sequence number"];
|
||||||
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ newForWritingWithConnection: (Connection*)c
|
+ newForWritingWithConnection: (Connection*)c
|
||||||
|
@ -136,9 +139,12 @@ static BOOL debug_connected_coder = NO;
|
||||||
getClassname: (char *) name
|
getClassname: (char *) name
|
||||||
formatVersion: (int*) version
|
formatVersion: (int*) version
|
||||||
{
|
{
|
||||||
return;
|
const char *classname = class_get_class_name (self);
|
||||||
|
strcpy (name, classname);
|
||||||
|
*version = CONNECTED_CODER_FORMAT_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
+ newDecodingWithConnection: (Connection*)c
|
+ newDecodingWithConnection: (Connection*)c
|
||||||
timeout: (int) timeout
|
timeout: (int) timeout
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue