RE: Trying to send data to PC
RE: Trying to send data to PC
- Subject: RE: Trying to send data to PC
- From: Kenny Millar <email@hidden>
- Date: Mon, 14 Dec 2009 13:59:30 +0000
Also bear in mind, that if your are using a G4/G5 Mac then the processors
are not of the same design, with the PC being little endian and the G4/G5
being big endian, so you'd need to do some byte swapping with the data.
On the windows PC you can use Windows Sockets (winsock) or if you're a fan
of the Microsoft Foundation Classes (MFC) look at CSocket and CAsyncSocket.
Windows by default knows didley-squat about Bonjour and has no APIs for
listening for bonjour services etc, so it's easier to make the PC the
'server' which 'listens' for a connection from the Mac, and make the Mac the
Client which connects to the PC.
-Kenny M.
-----Original Message-----
From: macnetworkprog-bounces+kennymillar=email@hidden
[mailto:macnetworkprog-bounces+kennymillar=email@hidden] On
Behalf Of Quinn
Sent: 14 December 2009 09:28
To: email@hidden
Subject: Re: Trying to send data to PC
At 21:32 -0400 13/12/09, Daniel Veneros wrote:
>Does anyone knows how can I connect both pplatforms using sockets?
On the Mac side you can use a variety of different networking APIs.
The one I generally recommend is NSStreams, as illustrated by the
SimpleNetworkStreams sample. Alternatively, you can use the standard
BSD sockets API.
<http://developer.apple.com/iPhone/library/samplecode/SimpleNetworkStreams/i
ndex.html>
On the Windows side... well, let's just say I'm not enough of a
Windows expert to offer you specific advice about Windows programming.
Ultimately this is going to boil down to one of the machines opening
a listening socket and registering it as a Bonjour service. The
other machine then browses for services, resolves the appropriate
one, and connects to it. At this point the server side accepts the
connection and communication can proceed.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden