Re: How to create a UDP, broadcast socket with "On-Receive" notifications for WinCE?

From: Ishan Tigunait (ishan_at_himalayaninstitute.org)
Date: 04/09/04


Date: 8 Apr 2004 21:28:13 -0700

Any ideas, please?

Is the CAsyncSocket class supposed to have functional callback
notifications for WinCE, or does only CCeSocket have working callback
notifications?

Since I need UDP sockets, it doesn't seem like I can use the CCeSocket
class since it only supports TCP (SOCK_STREAM) sockets. Any ideas on
an alternative (hopefully easy to implement) way to create a UDP
socket class that has "OnReceive" functionality, either via built-in
callbacks or some customized code (polling thread?) ?

It seems strange that the CSocket and CAsyncSocket classes are
included if Microsoft wanted developers to only the CCeSocket class
among all the included MFC socket classes.

Any help really appreciated.

Thanks,
Ishan

ishan@himalayaninstitute.org (Ishan Tigunait) wrote in message news:<55a28c24.0404070822.27360669@posting.google.com>...
> I need to create a socket class to be used for discovery broadcasts
> and acknowledgements (like DHCP). I've done this successfully in
> Windows XP( Win32/VC++ 6.0), but haven't had success in Windows CE 3.0
> (Pocket PC 2002).
>
> I tried to use the CAsyncSocket class, but haven't been able to get
> the OnReceive notification to work. Does anyone know if the
> CAsyncSocket class included with WinCe is capable of asynchronous
> OnReceive notifications, or if only the CCeSocket class has working
> notifications?
>
> I know about the OnReceive bug for CCeSocket that required manually
> setting the m_bConnectCalled to TRUE, but don't see how this would
> work for a connection-less UDP socket.
>
> Moreover, if CCeSocket is the only socket class that supports
> asynchronous notifications in WinCE, does anyone know if its possible
> to create UDP (SOCK_DGRAM) sockets instead of the default TCP
> (SOCK_STREAM) sockets? The CCeSocket::Create() doesn't allow
> specifying this, so I don't see how to create UDP socket class with
> notifications.
>
> Any help or suggestion would be greatly appreciated. Examples of
> working UDP socket code for WinCE would be great.
>
> Thanks,
> Ishan



Relevant Pages

  • Re: How to create a UDP, broadcast socket with "On-Receive" notifications for WinCE?
    ... notifications for WinCE, or does only CCeSocket have working callback ... Since I need UDP sockets, it doesn't seem like I can use the CCeSocket ... among all the included MFC socket classes. ...
    (microsoft.public.pocketpc.developer.networking)
  • Re: Pocket PC UDP and Multicast
    ... but CCeSocket never sets it to TRUE for UDP ... and set it to true after I create my UDP socket. ... Someone at microsoft needs to take a good look at the DataThread and DoRead ...
    (microsoft.public.win32.programmer.networks)
  • Re: Pocket PC UDP and Multicast
    ... Be aware that not only UDP but TCP implementation of CCeSocket have suffered ... and set it to true after I create my UDP socket. ... >> Then the server turns around and sends a UDP packet back to the pocket ...
    (microsoft.public.win32.programmer.networks)
  • Re: UDP connection attempts
    ... notifications for incoming new mails to the comsat service (which by default ... Either adjust your firewall to allow such notifications (UDP packets ...
    (FreeBSD-Security)
  • Re: Delivery delay
    ... New email notifications are pushed fro the Exchange Server via ... > UDP; should a problem arise with UDP connectivity, ... Exchange Server Push Notifications Generate ICMP Messages ...
    (microsoft.public.outlook.installation)