mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 09:41:15 +00:00
GSTcpPort tidyup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6122 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f483855510
commit
ce05a6d371
2 changed files with 3 additions and 2 deletions
|
@ -704,7 +704,7 @@ static NSMapTable *tcpHandleTable = 0;
|
||||||
nItems = GSSwapBigI32ToHost(h->nItems);
|
nItems = GSSwapBigI32ToHost(h->nItems);
|
||||||
NSAssert(nItems >0, NSInternalInconsistencyException);
|
NSAssert(nItems >0, NSInternalInconsistencyException);
|
||||||
rItems = [[NSMutableArray alloc] initWithCapacity: nItems];
|
rItems = [[NSMutableArray alloc] initWithCapacity: nItems];
|
||||||
if (rLength > sizeof(GSPortMsgHeader))
|
if (rWant > sizeof(GSPortMsgHeader))
|
||||||
{
|
{
|
||||||
NSData *d;
|
NSData *d;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,8 @@ main()
|
||||||
remote = [names portForName: @"GSTcpPort"];
|
remote = [names portForName: @"GSTcpPort"];
|
||||||
[loop addPort: (NSPort*)local forMode: NSDefaultRunLoopMode];
|
[loop addPort: (NSPort*)local forMode: NSDefaultRunLoopMode];
|
||||||
[remote sendBeforeDate: [NSDate dateWithTimeIntervalSinceNow: 240]
|
[remote sendBeforeDate: [NSDate dateWithTimeIntervalSinceNow: 240]
|
||||||
components: [NSMutableArray arrayWithObject: [NSData data]]
|
components: [NSMutableArray arrayWithObject:
|
||||||
|
[NSData dataWithBytes: "hello" length: 5]]
|
||||||
from: local
|
from: local
|
||||||
reserved: 0];
|
reserved: 0];
|
||||||
[loop run];
|
[loop run];
|
||||||
|
|
Loading…
Reference in a new issue