Click to See Complete Forum and Search --> : AF_APPLETALK under Winsock


October 27th, 1999, 05:37 PM
I am looking for expert advice on programming AF_APPLETALK under
Winsock. I have read the MS docs, seen the sample code on MSDN, etc.

What I need is sample code of someone who has successfully implemented a
full-blown PAP server using the Windows Sockets for Appletalk extensions.

For example, how do I set the PAP server status?
setsockopt() using the SO_PAP_SET_SERVER_STATUS returns errors, and
there is no documentation as to what the correct status input string
should be? I am using setsockopt() as per the documentation.

Another example is the detection of read EOF. After setsockopt(SO_PAP_PRIME_READ)
and WSAReadEx, I often recieve "EOF" or "MATK" in the receive buffer. Shouldn't
EOF be handled some other way, and not in the message data? And what does MATK
mean?

For example, PAP is a read-oriented, client-driven protocol, where typical client
applications "request" CloseConn, and the server should "reply" with a CloseConn Relpy
and subsequently close the connection. How does one detect the CloseConn request?
Reading until error is poor substitute. I need to detect the CloseConn, right?

And there are other areas of confusion... and scant documentation. I
really need to see some working sample code for even the most basic
of PAP Appletalk functions. As I said, I have read the
Appletalk on Winsock doc, and poured over the sample code. The sample
code demonstrate some client/server PAP exchanges from NT to NT,
but does not demonstrate code that will communicate with a Mac using PAP
without error.