• 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
Bah, Networking Woes!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bah, Networking Woes!


  • Subject: Bah, Networking Woes!
  • From: Graham Wihlidal <email@hidden>
  • Date: Tue, 10 Jul 2001 04:04:19 -0600

I can't seem to get this code working, anyone know what I am doing wrong? I have the server running on that port, yet it never receives any connection requests.

TIA,

Graham


void StartupSocket(void)
{
CFSocketRef s = CFSocketCreate(NULL, PF_INET, SOCK_STREAM, IPPROTO_TCP, kCFSocketDataCallBack, SocketDataAvailable, NULL);
CFRunLoopSourceRef source;
CFDataRef addr;
struct sockaddr_in sin;
char addy[] = "gamescouter.com";
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_port = htons(4444);
addr = CFDataCreate(NULL,addy, sizeof(addy));
CFSocketConnectToAddress(s, addr, 0);
source = CFSocketCreateRunLoopSource(NULL, s, 0);
CFRunLoopAddSource(CFRunLoopGetCurrent(), source, kCFRunLoopCommonModes);
}

SocketDataAvailable(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *data, void *info)
{
printf("Got data!\n");
}


  • Prev by Date: Re: Copy via Pasteboard
  • Next by Date: Re: Security framework question
  • Previous by thread: Re: Copy via Pasteboard
  • Next by thread: Re: Bah, Networking Woes!
  • Index(es):
    • Date
    • Thread