Click to See Complete Forum and Search --> : Socket Questions


Malder
05-01-2003, 12:24 PM
Hello,
I'm new to Pocket PC, so sorry for dumb questions.
I code using EVC and I'm having problems dealing with sockets.
1)Why doesn't Receive() work after writing to the socket and I have to shutdown

writing in socket. And how to write to it again(without recconect)?
2)I need to connect using fixed timeout, how can i set timeout? SetOpt does not

support changing timeout in Win CE.
3)How can I deal with socket functions without blocking thread. I tried IOCtl(),

but after i enabled nonblocking mode of the socket function Connect() hangs.
4)Where can i find examples of woking with sockets?
Very thank you for any help!

ProgrammingAce
05-21-2003, 04:07 AM
I only started working with sockets recently, but I'll try to help.

1) I dont think you can write to a receiving socket. That will be like the opposite direction of traffic flow. I ended up creating a sending socket, a receiving socket, and a listening socket (it did the actual receiving of messages and is an instance of the receiving socket).

2) Don't know, I either didnt use them or just used the defaults.

3) I tried using the ioctlsocket() function as well to turning my listening socket into nonblocking mode. It didnt hang, but it was still blocking. Is nonblocking not supported by Win CE??

4) Don't know, I couldn't find any. I ended up having to write two different programs from scratch while resorting to numerous online references about winsock, sockets, related functions, etc...