Hello everybody,

I develop network application for PalmOS 4.0 and higher.
For more frendly UI I want to use non-blocking socket calls.
Here are my steps:
1) Create socket
2) make socket nonblocking
NetLibSocketOptionSet(netSocketOptSockNonBlocking)
3) connect socket - NetLibSocketConnect - got netErrWouldBlock error
4) call NetLibSelect(&read, &write, &except)
5) analize result of NetLibSelect

It works on PalmOS Emulator (OS 4.0) and PalmOS Simulator (OS 5.2) but
don't work on real device (I have Tungsten T). On TT NetLibSelect returns
immideately regardless of connection result (success, timeout,rejected).
It's not a big problem if I can recognize socket state (if it connected).
But
I did not find any approach to check the socket. Usually I use
getsockopt(SO_ERROR) on other platforms, but on PALM OS I have strange
result for analog of getsockopt - NetLibSocketOptionGet
(netSocketOptSockErrorStatus)

1) PALMOS emulator wanted 4-byte buffer for result and
returns WIN32 Network error code (10XXX)  :-)
2) PALMOS simulator wanted 2-byte buffer and returns netErrUnimplemented
3) TungstenT  wanted 2-byte buffer and returns errNone

So I want make either NetLibSelect or NetLibSocketOptionGet
(netSocketOptSockErrorStatus) work correct regardless of PalmOS version and
design. Or I want recognize if the socket connected.

Any ideas?
Thank you,
Murad Kakabayev





-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to