CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: winsock issue

  1. #1
    Join Date
    Apr 2002
    Posts
    7

    winsock issue

    Hi Friends,

    Out of winsock.h and winsock2.h which is better to use in windows based application in terms of performance and future compatiabilty with other windows components.

    Please let me know.

    Thanks

    Sarma

  2. #2
    Join Date
    May 2002
    Location
    Atlanta,GA
    Posts
    262

    Re: winsock issue

    Originally posted by eHunter
    Hi Friends,

    Out of winsock.h and winsock2.h which is better to use in windows based application in terms of performance and future compatiabilty with other windows components.

    Sarma
    "winsock2.h" api is much better/clean than winsock.h. The library has much richer function calls that allow you to do things like asyncrhonus I/O which is not possible in the winsocket v1. However winsock v1 is almost a complete berkely socket implementation. If you write your programs with that, it will be much easier to port over to Unix/Linux later.
    Jared

  3. #3
    Join Date
    Apr 2002
    Location
    Tokyo
    Posts
    14
    Well it all depends upon the kind of application you are going to develop and you need. If you are just looking at windows then ofcourse winsock2.h is better because of its richness. But if you are planning to port your application over other os like linux then at that time it will make you job easier if you ve used winsock.h. Again it all depends on you need and requirements so you can not generalise it.

    - Hemant

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

Featured