mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Patches submitted from May 20 to Aug 28 1997
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2406 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7b12c4af23
commit
a57d791f91
119 changed files with 16409 additions and 1698 deletions
|
@ -1,6 +1,6 @@
|
|||
#include <stdio.h>
|
||||
#include <gnustep/base/TcpPort.h>
|
||||
#include <gnustep/base/RunLoop.h>
|
||||
#include <Foundation/NSRunLoop.h>
|
||||
#include <gnustep/base/Invocation.h>
|
||||
#include <Foundation/NSDate.h>
|
||||
|
||||
|
@ -36,18 +36,18 @@ int main (int argc, char *argv[])
|
|||
initWithObjectFunction: handle_incoming_packet]
|
||||
autorelease]];
|
||||
|
||||
[[RunLoop currentInstance] addPort: in_port
|
||||
forMode: RunLoopDefaultMode];
|
||||
[[NSRunLoop currentRunLoop] addPort: in_port
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
packet = [[TcpOutPacket alloc] initForSendingWithCapacity: 100
|
||||
replyInPort: in_port];
|
||||
[packet writeFormat: @"Here is message number %d", i];
|
||||
[out_port sendPacket: packet];
|
||||
[out_port sendPacket: packet timeout: 10.0];
|
||||
[packet release];
|
||||
|
||||
[RunLoop runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 1.0]];
|
||||
[NSRunLoop runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 1.0]];
|
||||
}
|
||||
|
||||
[out_port close];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue