Need some help with SmallSockets/Networking
Need some help with SmallSockets/Networking
- Subject: Need some help with SmallSockets/Networking
- From: Albert Atkinson <email@hidden>
- Date: Tue, 17 Dec 2002 08:26:16 -0600
I am setting up a basic client/server system using SmallSockets. Here
is the code I have for the server:
socket = [[Socket alloc] init];
[socket listenOnPort:2987];
[socket acceptConnection];
[socket writeString:@"AWUP-2987-300-BE\n"];
[socket release];
Basically this listens for a connection on port 2987 and when a
connection is established it will respond with "AWUP-2987-300-BE" Now,
if I go into the terminal and type:
telnet localhost 2987
It will respond:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
AWUP-2987-300-BE
Now, how would I set up my client application to perform a similar
action, telnet the IP address of the server machine and then grab the
string sent by the server ("AWUP-2987-300-BE") and put it into an
NSString?
Thanks in advance for help!
Albert
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.