Thread: winsock experts

  1. #1
    Registered User
    Join Date
    Aug 2002

    winsock experts

    I'm hoping somebody can help me with my winsock program.

    I'm trying to get WriteFileEx to work with overlapped I/O on a socket. The trouble is, you can't specify a port or destination address with WriteFileEx, you can only specify the socket handle

    I've tried two different approaches to fix this:

    1) Tried writing a raw socket and filling in the IP Header and UDP header myself, then sending this off. That didn't seem to work
    2) Tried binding the socket to a sockaddr_in structure before the send. That didn't work either.

    Thing is, I'm not getting any errors. My completion routine is even called. It's just that the receiving program isn't getting the data.

    If anyone has ever done something like this, I'd appreciate a nudge in the right direction


  2. #2
    train spotter
    Join Date
    Aug 2001
    near a computer
    What are the returns from WriteFileEx() and GetLastError() ?
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Winsock issues
    By tjpanda in forum Windows Programming
    Replies: 3
    Last Post: 12-04-2008, 08:32 AM
  2. Winsock Messaging Program
    By Morgul in forum Windows Programming
    Replies: 13
    Last Post: 04-25-2005, 04:00 PM
  3. Where do I initialize Winsock and catch messages for it?
    By Lithorien in forum Windows Programming
    Replies: 10
    Last Post: 12-30-2004, 12:11 PM
  4. Winsock Problem
    By Noxir in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2004, 10:50 AM
  5. winsock
    By pode in forum Networking/Device Communication
    Replies: 2
    Last Post: 09-26-2003, 12:45 AM