Results 1 to 6 of 6

Thread: Simple Winsock question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2005
    Location
    Cleveland, Ohio
    Posts
    255

    Simple Winsock question

    I am trying to make multiple udp client / server

    In my server i have

    Winsock1.LocalPort = 1999
    Winsock1.Remoteport = 1999
    Winsock1.Bind

    In my client I have

    Winsock1.RemoteHost = "127.0.0.1"
    Winsock1.Remoteport = 1999
    Winsock1.Bind

    Now my client can send my server information. But when my server try to send data back, it says Address Family Not Supported.

  2. #2
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: Simple Winsock question

    Why are you using UDP? TCP is way cooler!

    Also, you are doing this all on a local host in which the ports are being fought over, like little kids with a Rubik's cube.

    Try running it from different machines, actual external IP's, not local host.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2005
    Location
    Cleveland, Ohio
    Posts
    255

    Re: Simple Winsock question

    What are you smokin? lol

    Im making a multiplayer mod and when using TCP it was laaaaaaagy. But then I switched to udp and that made things like 100% smooth. So moving back to tcp is simply not an option.

    It also happens with other ips, not just localhost

  4. #4
    Hyperactive Member wiccaan's Avatar
    Join Date
    Apr 2004
    Location
    127.0.0.1
    Posts
    475

    Re: Simple Winsock question

    Have you tried using a socket index with the sockets?

    Also, have you tried using port 0 as the local port on the server?
    If my post was helpful please rate it

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2005
    Location
    Cleveland, Ohio
    Posts
    255

    Re: Simple Winsock question

    Localport as 0? Then how will the client know what port to send data to?

    Also, ive never heard of indexes with UDP.. do udp servers require a RemotePort?

    It would be best if someone would kindly point me to a multiple-user UDP example. Thanks.

  6. #6
    Hyperactive Member wiccaan's Avatar
    Join Date
    Apr 2004
    Location
    127.0.0.1
    Posts
    475

    Re: Simple Winsock question

    Found this just a second ago. It may help, not sure though.

    http://pscode.com/vb/scripts/ShowCod...23911&lngWId=1
    If my post was helpful please rate it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width