Hi, as so many i'm new to Cococa programming, but i started to like after doing the Currency tutorial.
I want to achieve a very simple task, here's what:
I want to connect to a webserver and display the returned HTML in a NSTextField. I setted up the interface, so all i need is the code.
Here's what i have so far:
#import "socketController.h"
@implementation socketController
- (IBAction)connectSocketid)sender
{
int thePort;
NSString *hostName;
NSSocketPort *theSocket;
NSConnection *theConnection;
thePort = [port_Field intValue];
hostName = [IP_Field stringValue];
theSocket = [[NSSocketPort alloc]initRemoteWithTCPPortunsigned short)thePort host:hostName];
theConnection = [NSConnection connectionWithReceivePort:theSocket sendPort:theSocket];
}
@end
What is the next step? How do i write to the webserver? How do i check the incoming data?
Help would be muchos appreciated!
Flor
I want to achieve a very simple task, here's what:
I want to connect to a webserver and display the returned HTML in a NSTextField. I setted up the interface, so all i need is the code.
Here's what i have so far:
#import "socketController.h"
@implementation socketController
- (IBAction)connectSocketid)sender
{
int thePort;
NSString *hostName;
NSSocketPort *theSocket;
NSConnection *theConnection;
thePort = [port_Field intValue];
hostName = [IP_Field stringValue];
theSocket = [[NSSocketPort alloc]initRemoteWithTCPPortunsigned short)thePort host:hostName];
theConnection = [NSConnection connectionWithReceivePort:theSocket sendPort:theSocket];
}
@end
What is the next step? How do i write to the webserver? How do i check the incoming data?
Help would be muchos appreciated!
Flor