• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Need some help with SmallSockets/Networking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Need some help with SmallSockets/Networking
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Using image as a mask
  • Next by Date: Re: Help me please to find a job in Cocoa
  • Previous by thread: Re: Using image as a mask
  • Next by thread: Re: Need some help with SmallSockets/Networking
  • Index(es):
    • Date
    • Thread