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
f0a72da206
commit
25afcc3594
119 changed files with 16409 additions and 1698 deletions
|
@ -2,7 +2,7 @@
|
|||
#include <gnustep/base/TcpPort.h>
|
||||
#include <gnustep/base/Notification.h>
|
||||
#include <gnustep/base/Invocation.h>
|
||||
#include <gnustep/base/RunLoop.h>
|
||||
#include <Foundation/NSRunLoop.h>
|
||||
|
||||
id announce_new_connection (id notification)
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ id handle_incoming_packet (TcpInPacket *packet)
|
|||
replyInPort: port];
|
||||
[packet writeFormat: @"Your's was my message number %d",
|
||||
message_count];
|
||||
[reply_port sendPacket: packet];
|
||||
[reply_port sendPacket: packet timeout:10.0];
|
||||
[packet release];
|
||||
return nil;
|
||||
}
|
||||
|
@ -76,9 +76,9 @@ int main (int argc, char *argv[])
|
|||
[[[ObjectFunctionInvocation alloc]
|
||||
initWithObjectFunction: handle_incoming_packet]
|
||||
autorelease]];
|
||||
[[RunLoop currentInstance] addPort: port
|
||||
forMode: RunLoopDefaultMode];
|
||||
[RunLoop run];
|
||||
[[NSRunLoop currentRunLoop] addPort: port
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
[NSRunLoop run];
|
||||
#else
|
||||
{
|
||||
id packet;
|
||||
|
@ -99,7 +99,7 @@ int main (int argc, char *argv[])
|
|||
replyPort: port];
|
||||
[packet writeFormat: @"Your's was my message number %d",
|
||||
message_count];
|
||||
[reply_port sendPacket: packet withTimeout: 20 * 1000];
|
||||
[reply_port sendPacket: packet timeout: 20.0];
|
||||
[packet release];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue