mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
([ConnectedCoder +newDecodingWithConnection:timeout:]): Rename
coderReadingFromStream to newReadingFromStream, and don't retain. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@881 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
401ec323bf
commit
666be690b4
1 changed files with 7 additions and 5 deletions
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include <objects/stdobjects.h>
|
#include <objects/stdobjects.h>
|
||||||
#include <objects/ConnectedCoder.h>
|
#include <objects/ConnectedCoder.h>
|
||||||
|
#include <objects/CStream.h>
|
||||||
#include <objects/SocketPort.h>
|
#include <objects/SocketPort.h>
|
||||||
#include <objects/MemoryStream.h>
|
#include <objects/MemoryStream.h>
|
||||||
#include <objects/Connection.h>
|
#include <objects/Connection.h>
|
||||||
|
@ -108,8 +109,7 @@ static BOOL debug_connected_coder = NO;
|
||||||
eofPosition:len-2
|
eofPosition:len-2
|
||||||
prefix:2
|
prefix:2
|
||||||
position:0];
|
position:0];
|
||||||
newsp = [[self coderReadingFromStream: ms]
|
newsp = [self newReadingFromStream: ms];
|
||||||
retain];
|
|
||||||
newsp->remotePort = rp;
|
newsp->remotePort = rp;
|
||||||
newsp->connection = [Connection newForInPort:inPort
|
newsp->connection = [Connection newForInPort:inPort
|
||||||
outPort:newsp->remotePort
|
outPort:newsp->remotePort
|
||||||
|
@ -136,13 +136,15 @@ static BOOL debug_connected_coder = NO;
|
||||||
int sent_len;
|
int sent_len;
|
||||||
id ip, op;
|
id ip, op;
|
||||||
char *b;
|
char *b;
|
||||||
|
id stream;
|
||||||
|
|
||||||
ip = [connection inPort];
|
ip = [connection inPort];
|
||||||
if (!ip) [self error:"no inPort"];
|
if (!ip) [self error:"no inPort"];
|
||||||
op = [connection outPort];
|
op = [connection outPort];
|
||||||
if (!op) [self error:"no outPort"];
|
if (!op) [self error:"no outPort"];
|
||||||
buffer_len = [(MemoryStream*)cstream streamBufferLength];
|
stream = [cstream stream];
|
||||||
b = [(MemoryStream*)cstream streamBuffer];
|
buffer_len = [(MemoryStream*)stream streamBufferLength];
|
||||||
|
b = [(MemoryStream*)stream streamBuffer];
|
||||||
/* Put the packet length in the first two bytes */
|
/* Put the packet length in the first two bytes */
|
||||||
b[0] = buffer_len % 0x100;
|
b[0] = buffer_len % 0x100;
|
||||||
b[1] = buffer_len / 0x100;
|
b[1] = buffer_len / 0x100;
|
||||||
|
@ -305,7 +307,7 @@ exc_return_null(arglist_t f)
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
@implementation Object (ConnectedCoderCallbacks)
|
@implementation NSObject (ConnectedCoderCallbacks)
|
||||||
|
|
||||||
/* By default, Object's encode themselves as proxies across Connection's */
|
/* By default, Object's encode themselves as proxies across Connection's */
|
||||||
- classForConnectedCoder:aRmc
|
- classForConnectedCoder:aRmc
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue