[Plib-users] netMessageChannel
Brought to you by:
sjbaker
|
From: Leo H. <hw...@ec...> - 2002-04-07 23:21:04
|
Hi, I'm trying to use the netMessageChannel class to make a simple client/server program in which the client sends a netMessage to the server, and have the server print out that message through its handleMessage() member function. One of the things I'm unsure of is what to do inside of handleAccept()? Right now, i call accept(netAddress), but I don't particularly do anything with the modified netAddress. On the client side, I construct a netMessage, and send it out with the sendMessage function. Then I call the loop function (which I presume sends the message). However, on the server side, the handleAccept() is called, but the handleMessage() is not, meaning the server never received the message. I believe it may be something to do with what I'm doing in handleAccept(), but I have little experience with network programming. If you can suggest anything from what you've read, or provide links to example code[1], or even take a look at the code, it would be much appreciated. code is at: http://www.ecf.utoronto.ca/~hwangl/net/ [1] the NET section on the PLIB site has little documentation on how to use the classes, and the http_get example from plib_examples helped only with the client side. thanks, leo |