Recent

Author Topic: Socket in Windows Ce  (Read 3152 times)

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Socket in Windows Ce
« on: August 22, 2013, 01:14:00 pm »
When working with sockets in Windows CE 6.0 I have a problem. After each operation, you need to make a delay.
The first time I solved this problem when doing emulation module WinInet in Wince (I know that there is a standard module, but it did not work).
Set the time when working with sockets - especially WinCe or is there some other mechanism is used? Or is the problem of CPU board? (I use FriendlyArm)

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Re: Socket in Windows Ce
« Reply #1 on: August 23, 2013, 12:50:55 pm »
The problem is solved. Pause WinCe when working with sockets needed for HTTP requests. When working TCP and UDP pause is needed.
The problem was different. I forgot that the only WinCe blocking sockets.
In WinCe can not used:
Code: [Select]
1)  if SetSockOpt(hReceiver, SOL_SOCKET, SO_BROADCAST, PAnsiChar(@BroadCastData), SizeOf(BroadCastData)) = SOCKET_ERROR then
    exit;
2)  arg     := 1;
  if ioctlsocket(ASocket, FIONBIO, arg) = SOCKET_ERROR then
    exit;

proxy3d

  • Jr. Member
  • **
  • Posts: 76
Re: Socket in Windows Ce
« Reply #2 on: August 26, 2013, 03:21:58 pm »
I'm sorry, SO_BROADCAST option works WinCe. I saw that I was trying to set an option for TCP protocol.
SO_BROADCAST option is for UDP protocol.