continu to search info (Socket)
continu to search info (Socket)
- Subject: continu to search info (Socket)
- From: Denis Gauthier <email@hidden>
- Date: Tue, 8 May 2001 09:24:41 -0400
Hello All
we are advancing a little.
we write this code :
- (void)applicationDidFinishLaunching:(NSNotification *)notification
{
NSPort *AffichPort;
NSConnection *conn;
[Fenetre1 setFrameAutosaveName:@"Telecom Fenetre"];
[Fenetre1 makeKeyAndOrderFront:nil];
AffichPort = [[NSSocketPort alloc] initWithTCPPort:PORT];
conn = [[NSConnection alloc] initWithReceivePort:AffichPort sendPort:nil];
if (!conn)
{
NSLog(@"didn't connect");
exit(1);
}
[conn setDelegate:self];
NSLog(@"serving");
So, we have a window Open, and on another computer, we can telnet the app. The problem we have, is :
HOW TO READ, and WRITE the information coming from this port ?
DGA
--
Denis Gauthier
Agent de support en informatique
Universite Laval, Quebec, 656-2131 poste 8158
http://www.sit.ulaval.ca/pagespersonnelles/dga/dga.html
***
*** " an APPLE a day keeps the doctor away " ***
***