New file.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1031 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1996-03-01 16:26:49 +00:00
parent e02b57fc4e
commit c5f461d3a3
2 changed files with 46 additions and 0 deletions

25
Testing/tcpport-client.m Normal file
View file

@ -0,0 +1,25 @@
#include <stdio.h>
#include <objects/TcpPort.h>
int main ()
{
id port;
id packet;
int i;
port = [TcpOutPort newForSendingToRegisteredName: @"tcpport-test"
onHost: @"localhost"];
for (i = 0; i < 5; i++)
{
packet = [[TcpPacket alloc] initForSendingWithCapacity: 100
replyPort: nil];
[packet writeFormat: @"Here is message number %d\n", i];
[port sendPacket: packet withTimeout: 20 * 1000];
[packet release];
}
[port close];
exit (0);
}