Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Code warrior for Mac > Need a clarific...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 2162 of 2226
Post > Topic >>

Need a clarification - OpenTrans****t on 9.1

by Don Bruder <dakidd@[EMAIL PROTECTED] > Aug 21, 2006 at 12:39 PM

Yeah, yeah, I know - it's ancient history, etc. etc. etc. Can we just 
assume that part has been said? Thanks.


I'm banging away on an OpenTrans****t-based app that needs to listen for 
an incoming TCP/IP connection, accept it, and do some private-protocol 
setup work on it. 

I've gotten as far as the "accept" part, with everything seeming to go 
according to plan, but I'm running into a question.

I'm working in "straight" C, under Carbon on MacOS 9.1, and doing the 
endpoints asynchronously, with a notifier installed. The notifier 
converts the OT event into an AppleEvent, and posts it to the 
application event queue, where it gets dealt with at Application Event 
time. (eventually - I'm aware of the possible- OK, probable - latency 
issues in dealing with networking at the eventloop level) Oh, and I'm 
using the "tilisten" module in the configuration string for the listener 
endpoint, to serialize connection requests.

As I said, it seems to be working, as far as I've gotten. However, 
there's something I don't understand, despite digging through my 
"Networking with OpenTrans****t" do***entation.

Since I'm running asynch, OTAccept() is punching two notifications 
through on completion - First one being "T_ACCEPTCOMPLETE", with the 
listening endpoint as the cookie, being sent to the listening endpoint, 
and the second one being "T_PASSCON", with the endpoint that the 
connection was accepted on as the cookie, and sent to the accepting 
endpoint. 

There's also a caveat about how an endpoint can get a T_DATA event 
before it sees the T_PASSCON, and what to do about that. I'm pretty sure 
I've got that base covered.

The T__PASSCON event is obviously informational, and offers a chance for 
me to hook in and do some housekeeping that needs to happen before the 
endpoint truly gets put to work. A chance I take full advantage of.

What I can't figure out is how to cope with the T_ACCEPTCOMPLETE event - 
It *APPEARS* to be purely informational, as far as I can figure out. Is 
that figuring correct? As in, can I simply ignore it without running 
into difficulty later? Or do I need to do something in response to the 
T_ACCEPTCOMPLETE event? Some sort of "OK, we're done with this listen 
event, go back to listening for connection requests" action I need to 
take to "reset" the listener endpoint?

Any assistance/clarification appreciated.

-- 
Don Bruder - dakidd@[EMAIL PROTECTED]
 - If your "From:" address isn't on my
whitelist,
or the subject of the message doesn't contain the exact text
"PopperAndShadow"
somewhere, any message sent to this address will go in the garbage without
my
ever knowing it arrived. Sorry... <http://www.sonic.net/~dakidd>
for more
info
 




 1 Posts in Topic:
Need a clarification - OpenTransport on 9.1
Don Bruder <dakidd@[EM  2006-08-21 12:39:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 19 23:36:00 CDT 2008.