Sockets programming

Discussion in 'Trading Software' started by Foz, Oct 10, 2003.

  1. Foz

    Foz

    Can anyone recommend a book for learning TCP/IP socket programming for Visual Basic in Windows?

    I want to be able to send orders to a broker with a raw FIX interface (no API, just a FIX engine with an IP address and port). I'm familiar with VB but not network programming.
     
  2. Not sure about a book, but take a look at:

    http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp

    A free fully functional VB sockets class. Bottom line: you may not need to learn how to program sockets if you use the right tool.

    If your intent behind learning sockets is to use sockets in your VB program, this will be helpful, if you really do want to learn how to program sockets, this will show you how one person implemented them in VB, so it should help with that as well.
     
  3. If you're doing fairly straightforward stuff, just read the VB Help file under the topics "Using the Winsock Control" and also "Winsock Control" (which documetns the properties, methods, events, etc.)

    The control encapsulates normal TCP and UDP communication functions and it's dead easy to use.
     
  4. Foz

    Foz

    Thanks, Tripack and Archangel! Your good advice will get me started.
     
  5. CalTrader

    CalTrader Guest

    The MSDN platform and library are good resources. Sockets are not very complicated - although unfortunately in Microsoft's implementation there are a few behaviours which differ from other implementations (BSD etc). Carefully read the documentation and thoroughly test and you will be fine ......

    Another good book - not necessarily for Windows - is Unix Network Programming by Stevens.
    .....
     
  6. cashonly

    cashonly Bright Trading, LLC

    Hi Foz,

    I may be working on something similar. Can you tell me what broker's FIX engine you'll be working with?

    Thanks,

    Cash


     
  7. nitro

    nitro

    Foz,

    I would be interested in knowing too.

    Thanks,

    nitro
     
  8. I would stay away from WinSock control with VB, specially if you ever need to run it on a server. It's a relic from the past.

    If you use .NET, you can use TcpClient and TcpServer in the NET namespace. There're some sample codes at msdn.com as well.

    You can also copy and paste java sample code from IB TWS, only a few lines of changes will make it work in C#.
     
  9. nitro

    nitro

    Thanks Trader,

    I was asking about the FIX API engine though. I do not touch VB unless I want to look at examples. I do all my coding in VC6, or C#.

    nitro