FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Need a clarification - OpenTransport on 9.1

 
   Mac (Home) -> Programmer Code RSS
Related Topics:
Bug in alloc.c? - I'm getting an infinite loop in alloc.c, which is located in This is with CW 9.5. The function is There is a do/while loop that searches for a block with the required size to allocate a block of..

Multiply defined symbol: .bss - Hi, when trying to build a dll for Windows using CW9 on MacOS, I get an error message like: Link Error : Multiply defined symbol: .bss in files file2.cpp The same message with the same filenames is repeated several times, but..

Where next? - Hi folks, All of my recent Mac coding has been Carbon C++, mostly using as a As most of my clients are moving to X and CW's future is, shall we say, uncertain I'm wondering where to look for my future coding setup. I've dabbled..

Does mwcc work on Tiger? - Anybody using the comand line compilers on 10.4? When saving the following simple program as int main() { double x = 0.5; return 0; } and trying to compile it with $ mwcc -c , I get the error message Error :..

Console app "file" selector - Hello, I feel like I've asked this before, but I did a search on the archives and came up short. I've got a console std c app that I'm compiling with CW. When it runs, it pops up a little menu where I can type in some command line arguments (for..
Next:  Programmer Code: Available: Metrowerks CodeWarrior 9 for Mac/Win  
Author Message
Don Bruder

External


Since: Apr 20, 2008
Posts: 58



(Msg. 1) Posted: Mon Aug 21, 2006 12:39 pm
Post subject: Need a clarification - OpenTransport on 9.1
Archived from groups: comp>sys>mac>system, others (more info?)

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 OpenTransport-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 OpenTransport" documentation.

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 DeleteThis @sonic.net - 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
Back to top
Login to vote
Display posts from previous:   
       Mac (Home) -> Programmer Code All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact