Thread: Multi-Platform TCPIP programming.

  1. #1
    Coin
    Guest

    Multi-Platform TCPIP programming.

    Lo All,

    I have to do a program for college where the same code works on both a linux and windows platform. Aswell as this it needs to send a small string of data between two computers, using TCP/IP.

    Im using MS Visual C++ on the windows platform and GCC in linux,
    the thing I need to know is what header file would I be able to use on both system for the TCP/IP code.

    It would be better if I could use and ANSI standard header file.

    My tutor told me to use TCPIP.H but MSVC doesnt seem to have it, I'm not sure if GCC does.

    Any ideas?

    Thanks in Advance....

    COiN

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    375
    Hm, it has been a while but winsock or something to that effect for Windows and ... oh what was it... something similar I believe on Linux... sorry I can't remember but look up socket programming and such I believe.... anyway, it isn't standard. There is no network or interprogram communication standard in C/C++. You'll have to be tricky and use #ifdef and #else 's to accomplish this I think. If not, please post again how you accomplished this.
    Allegro precompiled Installer for Dev-C++, MSVC, and Borland: http://galileo.spaceports.com/~springs/

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Hmm...it would be easy with Java.


    :: Runs for cover ::

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Sockets are a common question on the Windows Programming section. Run a search there for many tutes ect.

    In windows I think you need winsock2.h and / or WS2TCPIP.H

    WSA is a good topic to search the MS help.
    "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. MinGW Linking GUI Program
    By Tonto in forum Tech Board
    Replies: 19
    Last Post: 08-23-2006, 03:28 PM
  2. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  3. Visual C++ 2005 linking and file sizes
    By Rune Hunter in forum C++ Programming
    Replies: 2
    Last Post: 11-12-2005, 10:41 PM
  4. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM
  5. Multi Platform DLLs
    By Perica in forum C++ Programming
    Replies: 3
    Last Post: 11-02-2002, 07:40 PM